Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

where to contain image  RSS feed

 
Hero Man
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to keep the image reference in a variable
What will be the type of variable where i can keep the IMAGE like "abc.gif" or "xyz.jpg"
for eg
if want to keep the color i use
Color changingColor= Color.light;
but how i can keep the image as i want to make the program which keep on changing images on click of a button
thanx in advance
 
Fabio Chianese
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Choose one type as you need. java.awt.Image(subclass: BufferedImage); javax.swing.ImageIcon.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!