File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Swing / AWT / SWT and the fly likes JCheckBox with Image Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JCheckBox with Image" Watch "JCheckBox with Image" New topic

JCheckBox with Image

jamie ong

Joined: Nov 05, 2001
Posts: 24
i have a JTable which shows a list of images in individual cell, how can i allow the user to see the image and select through the checkbox?
many thanks
Shashi Kanta
Ranch Hand

Joined: May 08, 2002
Posts: 89
Icon icon=new ImageIcon("myImage.gif");
JCheckBox cb=new JCheckBox(icon);

jamie ong

Joined: Nov 05, 2001
Posts: 24
i tried out the method, but it doesnt seem to work with JTable with the JCheckBox object.
Any help to include the JCheckBox with the image into the table cell will be great.
It is sorta covered in the JavaRanch Style Guide.
subject: JCheckBox with Image
Similar Threads
problem with load image file
How To Write Some Text in a Horizontal Rule?
automatic display of the java list on mouseover an image
looking for a creative way to get a string from file.xml
thumbnail in jsp