• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to make an icon next to the text in the JTable cell?  RSS feed

 
Jacky Luk
Ranch Hand
Posts: 634
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Let's say, some figures compared to last month has risen, so I stick a up arrow icon next to the cell.
I know I visited a tutorial like this before. But I forgot where I got it
Thanks
Jack
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check out the renderer section in http://docs.oracle.com/javase/tutorial/uiswing/components/table.html
You can have a JLabel as your renderer and use the built in setter method for the icon/text
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!