File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Image in JTable

 
omar bili
Ranch Hand
Posts: 177
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
as for now i was loading my JTable from a Vector of Strings, can i show an
image in a JTable, can i add a JLabel in it (the JLabel will be containing
the Image) ?
Thanks
 
Nigel Browne
Ranch Hand
Pie
Posts: 682
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JTable has a default renderer to display an image, all you need to do is tell the table the type of data for each column and it will choose the appropriate renderer:
 
omar bili
Ranch Hand
Posts: 177
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Nigel for this example,
i guess i can put any component in the JTable.
Regards, Bili
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic