Loading Images
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Benjamin_Seow
Posted On:   Saturday, January 4, 2003 08:28 PM

Hi,
How do I load images into a GUI using JBuilder?

Anyone got a sample program?

Re: Loading Images

Posted By:   Bob_Wirka  
Posted On:   Saturday, February 8, 2003 09:41 PM

You can use a jLabel to display a GIF image. Examine, for instance, how the file folder image is used in the file menu; this is a good example.

You declare 'ImageIcon' objects in your class and then assign a GIF file to the ImageIcon object. Then later in your program , use the 'setIcon' method to load a new image.
About | Sitemap | Contact