og
asked on
Creating cell editor to JTableHeader
I'm working with swing 1.0.3, jdk1.1.6
The JTable cell has a cell editor and a cell renderer, while the JTableHeader has only a renderer. I would like to somehow simulate the same process of the cell for the header, so that the header will have pressable buttons on it, JTextField etc, and when the mouse don't touch any of them - to do the column drag. Can anyone give me some samples of how to do that?
Thanks in advance.
The JTable cell has a cell editor and a cell renderer, while the JTableHeader has only a renderer. I would like to somehow simulate the same process of the cell for the header, so that the header will have pressable buttons on it, JTextField etc, and when the mouse don't touch any of them - to do the column drag. Can anyone give me some samples of how to do that?
Thanks in advance.
ASKER
Adjusted points to 230
ASKER
Adjusted points to 270
og, you should inherit the table header component and change its behaviour. In order to create the editor for the header you had better look in the Swing sources and copy their manipulations regarding the editor.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
send it to og@technomed.au
ASKER
Got it! I'll check it out.
ASKER