Results 1 to 4 of 4
- 03-20-2012, 01:39 PM #1
Member
- Join Date
- Mar 2012
- Posts
- 2
- Rep Power
- 0
selected cell is not rendering of Jtable with AbstractTableModel
We have Jtable with AbstractTableModel , with out selecting any row if i sort the table everything is working fine.
But the problem is ..selecting a row and click on the sort , sorting is working fine ..only problem is to select the row (we have to click on any of the cell in that row), selected cell is not rendering , rest all cells and rows are rendering properly. if I press escape or any other action like click on same cell now the data in the cell is rendered.
we have implemented getTableCellRendererComponent and getTableCellEditorComponent methods ...i have inspected renderer method ..can confirm that only selected cell is not coming in the renderer.
After performing sorting , invoking fireTableDataChanged() (tried with fireTableRowsUpdated(0, getRowCount())).
- 03-20-2012, 09:09 PM #2
Re: selected cell is not rendering of Jtable with AbstractTableModel
Why AbstractTableModel? Do you really have a customization that precludes extending DefaultTableModel, where all of the basic functionality is already implemented?
To get better help sooner, post a SSCCE (Short, Self Contained, Compilable and Executable) example that demonstrates the problem.
dbWhy do they call it rush hour when nothing moves? - Robin Williams
- 03-21-2012, 02:19 PM #3
Member
- Join Date
- Mar 2012
- Posts
- 2
- Rep Power
- 0
Re: selected cell is not rendering of Jtable with AbstractTableModel
Yes , we have lot of customizations , rendering checkbox , images ,textfieds in table cell and filtering and sorting for each cell and highlight and unhighlight
- 03-21-2012, 05:57 PM #4
Re: selected cell is not rendering of Jtable with AbstractTableModel
Then you'll need to post that SSCCE.
Incidentally, if your custom model is dealing withyou have a wrong design. Those are all the jobs of the renderer and editor.rendering checkbox , images ,textfieds in table cell ... highlight and unhighlight
dbWhy do they call it rush hour when nothing moves? - Robin Williams
Similar Threads
-
checking if a cell in JTable is selected
By Dcalladi in forum AWT / SwingReplies: 4Last Post: 10-21-2011, 12:17 AM -
JButton to detect if cell in a table is selected
By Levian in forum New To JavaReplies: 5Last Post: 08-09-2011, 06:56 AM -
how to get the currently selected row fo a jtable?
By kulangotski in forum AWT / SwingReplies: 4Last Post: 01-16-2011, 05:22 AM -
confusing output of a selected cell in a JTable
By bigj in forum New To JavaReplies: 6Last Post: 01-30-2010, 02:55 PM -
Help with JTable rendering
By daniel2008 in forum AWT / SwingReplies: 8Last Post: 01-18-2009, 03:51 AM


1Likes
LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks