We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now

x

Creating cell editor to JTableHeader

og
og asked
on
Medium Priority
489 Views
Last Modified: 2009-07-29
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.
Comment
Watch Question

og

Author

Commented:
Adjusted points to 200
og

Author

Commented:
Adjusted points to 230
og

Author

Commented:
Adjusted points to 270

Commented:
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.
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
og

Author

Commented:
send it to og@technomed.au
og

Author

Commented:
Got it! I'll check it out.
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.