This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Icon in a JTable

 
fahad siddiqui
Ranch Hand
Posts: 85
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to display an icon in a cell of a JTable but i also want a "String" to be displayed beside it which would distinguish it as the icons would be the same.

Example:
I will display an image of a key in a table, but each key should display a different thread name beside it.

How is that possible?

Please help. urgently needed.
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
DefaultTableCellRenderer is a JLabel, so all you need to do is extend it to include the image.

 
Anand Karia
Ranch Hand
Posts: 156
Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think you must go through this.

java.sun.com/j2se/1.4.2/docs/api/javax/swing/JTable.html
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic