File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
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 />
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="" target="_blank" rel="nofollow"></a><br />Nator - <a href="" target="_blank" rel="nofollow"></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?!?
I agree. Here's the link:
subject: Display GIF file in JAVA application.
It's not a secret anymore!