wood burning stoves 2.0*
The moose likes Swing / AWT / SWT and the fly likes Display GIF file in JAVA application. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Display GIF file in JAVA application." Watch "Display GIF file in JAVA application." New topic

Display GIF file in JAVA application.

Victor Manske

Joined: Feb 20, 2004
Posts: 1
I know how to display a *.gif or *.jpg file in a java applet. But how do you display a *.gif or *.jpg file in a java application? Would I have to call a *.html to display a *.gif file in my "About" option dialog window in my java application? Remeber, there is a difference between a java application and a java applet.

Victor Manske<br />manskvp@excite.com
Dirk Schreckmann

Joined: Dec 10, 2001
Posts: 7023
Moving this to the Swing / JFC / AWT forum...

[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
Jose Botella
Ranch Hand

Joined: Jul 03, 2001
Posts: 2120
Welcome to the Ranch Victor!
Please take a look at How to use Icons in the Java Tutorial.

SCJP2. Please Indent your code using UBB Code
Brian Pipa
Ranch Hand

Joined: Sep 29, 2003
Posts: 299
You can check out my Splash screen class for some example code:

My Java Freeware:<br />MACCC - <a href="http://maccc.pipasoft.com" target="_blank" rel="nofollow">http://maccc.pipasoft.com</a><br />Nator - <a href="http://nator.pipasoft.com" target="_blank" rel="nofollow">http://nator.pipasoft.com</a>
Karl Nilsson

Joined: Jan 06, 2004
Posts: 14
it's not too complicated, it's almost like using a sound file
here's an example:

Why don't you just go into your home?<br />are you too good for your home, ball?!?
It is sorta covered in the JavaRanch Style Guide.
subject: Display GIF file in JAVA application.
Similar Threads
Image in a Applet.
repainting problems...
How to Export Images as GIF, JPG?
Display image from non-web directory
Storing Picture in Access DataBase