• Post Reply Bookmark Topic Watch Topic
  • New Topic

Insert Pictures with Swing

 
Scott Hanes
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, so I need to know how to Insert some pictures using BreezySwing. If i could get a command or an explanation on what I need to do to GET a picture in GUI I'd appreciate it! Thanks!
 
todd runstein
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not sure what BreezySwing is, but putting a picture in an image isn't hard. Also not really sure how you're going to use the image, so this is really basic.

The easiest way to load a "picture" that's on your harddrive is with ImageIcon:

ImageIcon image = new ImageIcon("mypic.gif");

You can then display this using a JLabel:

JLabel label = new JLabel(image);

Viola, a picture in your app. If this isn't what you're trying to do, please add more specific information about what you want.

Good luck!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!