[Logo]
Forums Register Login
how to put ImageIcon in JTable
Does the DefaultTableCellRender take care of displaying ImageIcon ? My table model has the getColumnClass defined.

Thanks
nope. but it should be fairly easy to enhance DefaultTableCellRenderer to do so.
Create a class ImageIconRenderer (or whatever) that extends DefaultTableCellRenderer.
Override the setValue method to

Register an instance of your new renderer to render ImagIcons using setDefaultRenderer.
that *should* do the trick !
D.
[ February 25, 2004: Message edited by: Don Kiddick ]
The moustache of a titan! The ad of a flea:
ScroogeXHTML 7.1 - RTF to HTML5 / XHTML converter
https://coderanch.com/t/690611/ScroogeXHTML-RTF-HTML-XHTML-converter


This thread has been viewed 585 times.

All times above are in ranch (not your local) time.
The current ranch time is
Feb 23, 2018 03:28:10.