Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JCheckBox with Image

 
jamie ong
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
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
Posts: 89
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Icon icon=new ImageIcon("myImage.gif");
JCheckBox cb=new JCheckBox(icon);

rgds,
Shashi
 
jamie ong
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic