• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Problem in getting output

 
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Bartender
Posts: 2270
20
Android Java ME Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How are you specifying the path?
 
Dhivya rajagopal
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you Dey

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
D:sunset.jpg
It displays the correct output

But if i place the image in the c: and give as
C:sunset.jpg
It doesn't show the image in the title bar


can you please tell me how to resolve
 
Swastik Dey
Bartender
Posts: 2270
20
Android Java ME Eclipse IDE Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dhivya,

The problem is escape characters, so you need to specify the path like this

 
Dhivya rajagopal
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Thank you Dey
 
Barry's not gonna like this. Barry's not gonna like this one bit. What is Barry's deal with tiny ads?
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
reply
    Bookmark Topic Watch Topic
  • New Topic