0

I'm working on my first project in Java in which I want the image (for profile photo) and text (for name) to be in same cell of the JTable. I have read many already asked ques Eg. How to Insert Image into JTable Cell, How do I add a JLabel[] to a JTable? but from none of them I got my answer. So can anybody help me in this?

1ac0
  • 2,875
  • 3
  • 33
  • 47
GURMEET SINGH
  • 111
  • 14
  • [this](https://stackoverflow.com/questions/4941372/how-to-insert-image-into-jtable-cell) will solve your problem if you try to implement it – ELITE Jul 16 '17 at 05:58
  • if above won't work, read about `DefaultTableCellRenderer` and implement it – ELITE Jul 16 '17 at 05:59
  • both can...I did second one before with success.. – ELITE Jul 16 '17 at 06:00
  • ok let my try it . thx, for help. – GURMEET SINGH Jul 16 '17 at 06:01
  • [How to Use Tables](http://docs.oracle.com/javase/tutorial/uiswing/components/table.html) and [Using Custom Renderers](http://docs.oracle.com/javase/tutorial/uiswing/components/table.html#renderer) – MadProgrammer Jul 16 '17 at 08:37
  • Well, [that's one way](https://stackoverflow.com/questions/25659273/jtable-image-render-is-taking-too-much-load-in-application/25660413#25660413) – MadProgrammer Jul 16 '17 at 08:38

0 Answers0