• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How do we add JLabel with leading Icon into JTable Cell

 
Deva
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I really want to add a JLabel with Icon & label name as (JLabel) into JTabel's cell. can any one help me ???
 
Rachel Swailes
Ranch Hand
Posts: 434
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to have a look at Sun's site for the tutorial on using Tables. Wha you are going to need to do is use a TableCellRenderer to put that lable into a JTable cell. If you look in your API at the JTable, there is a link to the tutorial called "How to use tables". Look carefully at the renderer and then ask some more specific questions.

Cheers,
Rachel
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic