Hello, I have two questions and I hope someone can help me. 1)if I have a JTable displaying two columns, one column displays string and the other one displays boolean (a checkbox). Say I have 3 rows in thistable. If I don't want to show the checkbox in the second row, how can I do that? 2) If the string is too long, it gets cut. How can I make the complete string popup when I move the mouse on that cell? Many thanks in advance.
1) If you are implementing TableModel, don't return Boolean for that column in getColumnClass() method. If you are using AbstractTableModel and its predecessors, don't set a Boolean Object in DataVector (or so that is used for holding TableData). 2) I think you have to override methods in unserlying UI Classes. Another simple way is to implement MouseMotionListener, and display a Label with that cell data with Labelx = Cellx, Labely = Celly, LabelHeight = CellHeight, but Label width will be more.
Joined: Aug 07, 2003
VIJAY Yadlapati Thanks for your reply on my questions. Do you have any example code or could you point me to some reference site where I can find examples?