Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

placing a gif file inside a cell in JTable  RSS feed

 
selvas kumars
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can anybody give me some idea how to place an image in the cell
of a Jtable.?
 
deekasha gunwant
Ranch Hand
Posts: 396
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi selvas,
I'd suggest to put the image inside JLabel.and have one or as many of your tablecolumns made up of such Jlabels.
regards
Deekasha
 
selvas kumars
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks deekasha,
when i tried i got javax.swing.jlabel[0,0...].
I want it only for a particular location.I got for the entire
column..please help me with some code.
selvas
 
deekasha gunwant
Ranch Hand
Posts: 396
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi selvas,
try this code. don't forget to give a valid image file .

regards
Deekasha
 
selvas kumars
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hai deekasha,
thanks a lot. working fine.
selvas.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!