I need to display a cell data (20.2,true) in Jtable in which 20.2 is float and true is a boolean value in the format (20.2,[JCheckBox]).Is it possible to render 2 different objects in such a manner?
I need to display a cell data (20.2,true) in Jtable in which 20.2 is
Share
Yeah it is. But I think you will need a Compound-Renderer, which means you have to create your own CellRenderer implementing TableCellRenderer or extending the existing DefaultTableCellRenderer. At least as long as you just want to display these values in your table, this should work fine for you.
Your Compound will consist of a Label for displaying your float and a checkbox for displaying your boolean.
EDIT:
Ok, here a small example:
Not perfect yet, but should give you ideas how to design your own renderer.