This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Picture Woes

 
Atrus Greyor
Ranch Hand
Posts: 110
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can you put a picture into a frame? I have tried the ImageIcon but it doesn't want to work for me?

Here is my code that SHOULD display a picture but it does not?



If anyone is able to help me it would be greatly apprecited!
 
Craig Wood
Ranch Hand
Posts: 1535
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You have to choose between AWT and Swing. It is generally recommended to not mix them. The ImageIcon and JLabel classes are both in the javax.swing package (see api).

If you choose AWT then this is one way to show an image.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic