aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes output area for image thumbnail Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "output area for image thumbnail" Watch "output area for image thumbnail" New topic
Author

output area for image thumbnail

Rakoczi Markus
Greenhorn

Joined: Mar 13, 2012
Posts: 13
Hello,

i want to create a small image file browser (using java swing) that outputs image thumbnails in one of the window area (the green area in the attached picture). What would be the proper swing component, to implement the respectiv area JTable or JPanel with JButtons, any other suggestion?
I want to implement operations like select, right click with mouse, or change color when the cursor is on the thumbnail.


[Thumbnail for Explorer.jpg]

Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18657
    
    8

I think a GridLayout would be a lot easier to work with than a JTable.

Likewise using JLabels would probably be simpler than JButtons -- I didn't see anywhere that you wanted to be able to click the thumbnails and make something happen.
Kemal Sokolovic
Bartender

Joined: Jun 19, 2010
Posts: 825
    
    5

Paul Clapham wrote:I didn't see anywhere that you wanted to be able to click the thumbnails and make something happen.

Even if it is the case, MouseEvent can be used to get information when the label is clicked.

I would also go with JLabel.


The quieter you are, the more you are able to hear.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: output area for image thumbnail