Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   Java (http://www.programmingforums.org/forum17.html)
-   -   images (http://www.programmingforums.org/showthread.php?t=11509)

deviantstefan Oct 6th, 2006 9:48 AM

images
 
please show me the simplest way of putting an image in a java aplication.thankx!
:confused: :confused: :confused:

ReggaetonKing Oct 6th, 2006 9:58 AM

:

ImageIcon icon = new ImageIcon("pic.jpg");
JLabel piclabel = new JLabel(icon);

How simple was that!

deviantstefan Oct 6th, 2006 10:10 AM

tkx reggaeton_king for the excelent answer!

ReggaetonKing Oct 6th, 2006 10:56 AM

you're welcome!

AntiNinja Oct 6th, 2006 3:22 PM

[php]
new JLabel(new ImageIcon("pic.jpg"));[/php]
..I win! :)

ReggaetonKing Oct 6th, 2006 3:27 PM

...you suck! lol


All times are GMT -5. The time now is 12:56 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC