This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes images in labels? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "images in labels?" Watch "images in labels?" New topic
Author

images in labels?

daman sidhu
Ranch Hand

Joined: Aug 19, 2000
Posts: 184
Hi,
I would like some help here, i am making a chat applicaiton in the top of which i want a banner to be displayed(advertisement) , how can i do that, i tried adding image in a label but then for the image to draw i have to use paint , which messes up the whole screen and the other things are not visible then like the textpane below it.Can anyone help.Ill be thankful.
Regards,
Daman
daman sidhu
Ranch Hand

Joined: Aug 19, 2000
Posts: 184
Hi,
I have worked out how to do that, instead of painting the images now i am using Image and ImageIcon class alongwith JLabel in which i am passing the imageicon , as a result it is now working properly.
 
GeeCON Prague 2014
 
subject: images in labels?