JXTreeTable with JCheckBox-Editor in JInternalFrames
I found a weird behavior with cellediting when using the JXTreeTable in a JInternalFrame.
I have a column where a checkbox should be displayed allowing the user to make it selected and unselected. When having my JXTreeTable inside a JInternalFrame with other components, the checkbox for cellediting doesn't change the state from selected to unselected and vice versa. Instead the focus is instantly being transfered back to the component that had the focus before (a textfield for example). When selecting a single cell in the JXTreeTable before clicking on the checkbox, the focus stays in the JXTreeTable and the checkbox state changes if i click it.
This problem only occurs when using a >>JInternalFrame<< that has additional Components like JTextFields beside the JXTreeTable.
The method getColumnClass(int col) in the TreeTableModel returns Boolean.class for this column. The method isCellEditable(Object node, int col) return true for this column. The method getValueAt(Object node, int col) returns the specified boolean value from my "userobject" for this column. The method setValueAt(Object value, Object Node, int col) sets the boolean value into my "userobject". However when facing the problem stated above, setValueAt is being called with the boolean-value my checkbox already has and not the new one.
I fixed this bug by overwriting the editCellAt(int row, int column, EventObject e) method from JXTreeTable and inserting the programcode that is being used in a JTable.
Let me know if you need some example code or point me to a bug report site for swinglabs.