This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Hi, The following program helps us to set the icon (image) on the title bar of the frame. but after executing it is not displaying the image in the title bar
If i simply set the name of the image alone, example- sunset.jpg, it doesn't show any error. but while running image is not displayed. if i give the whole path of the image, it displays compile time error ("illegal escape character).
can you please tell how to resolve
Before submitting this doubt in the forum, i gave as following
C:\Documents and Settings\All Users\Documents\My Pictures\Sample Pictures\sunset.jpg
But after that i found and gave
C:Documents and Settings:All Users:Documents:My Pictures:Sample Pictures:sunset.jpg
After giving the above, it doesn't show compile time error. But still the image didn't display in the title bar.
If i place the image in the d: drive and give as
It displays the correct output
But if i place the image in the c: and give as
It doesn't show the image in the title bar