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

Nonmodal window showing image

 
Norm Radder
Ranch Hand
Posts: 707
3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have an app that displays a question in a textarea and choices of answers in a list. Some of the questions have an image associated with them.
I don't normally use Swing classes, but in this case I thought they'd be useful.

What class(es) can I use to show an image in a non-modal window?
I want to display the window with an image when the associated question is being asked and dispose of it when the user moves on to the next question.

Thanks,
Norm
 
Jeff Albertson
Ranch Hand
Posts: 1780
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use javax.swing.JLabel + javax.swing.ImageIcon:

This should probably be in the Swing forum.
 
Norm Radder
Ranch Hand
Posts: 707
3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jeff,
Thanks!
The only change I needed was to use Class getResource() to run it from a jar file. And to remove the Exit on close.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic