Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Swing / AWT / SWT
Search Coderanch
Advance search
Google search
Register / Login
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
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
Swing / AWT / SWT
How to add images
Garry Kalra
Ranch Hand
Posts: 111
posted 22 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Pls suggest me what we can use to add images to panels and display them in an application.
It would be helpful if somebody could provide the names of the widgets.
Gaurav
anandh
Greenhorn
Posts: 22
posted 22 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Try this:
Icon imageIcon = new ImageIcon("MyImage.jpg");
JPanel myPanel = new JPanel();
myPanel.add(new JLabel(imageIcon));
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
can we.....
applets
Problem displaying images
Bodgitt n Scarper - Assigning image to system tray icon
How can I find my images??
More...