• Post Reply Bookmark Topic Watch Topic
  • New Topic

help me put a image in a table and choice  RSS feed

 
ayoub belkas
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
first of all sorry for the bad english
so working on a this table that have buttons ,check box and Choice .... so far i was successful . but i need a way to put a image in a cell , the cell must be in the same row as the button for the chooser .
her some code i was working on

the main class whit the table and the inpute .....


her is the model


and the button DefaultCellEditor


thank you in advance
 
Les Morgan
Rancher
Posts: 768
19
C++ Java MySQL Database Netbeans IDE Oracle Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think you could probably put a JLabel in there and use the label for the container for the image.
 
Rob Camick
Ranch Hand
Posts: 2801
15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
but i need a way to put a image in a cell


Add an ImageIcon to the TableMode. A JTable has a default renderer for Icons.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!