Solved

Creating cell editor to JTableHeader

Posted on 1998-08-27
7
466 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.
0
Comment
Question by:og
  • 5
  • 2
7 Comments
 

Author Comment

by:og
ID: 1222686
Adjusted points to 200
0
 

Author Comment

by:og
ID: 1222687
Adjusted points to 230
0
 

Author Comment

by:og
ID: 1222688
Adjusted points to 270
0
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 
LVL 6

Expert Comment

by:gadio
ID: 1222689
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.
0
 
LVL 6

Accepted Solution

by:
gadio earned 270 total points
ID: 1222690
og, send me your email I'll send you a sample code to check.

0
 

Author Comment

by:og
ID: 1222691
send it to og@technomed.au
0
 

Author Comment

by:og
ID: 1222692
Got it! I'll check it out.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
groupNoAdj 7 95
thymeleaf natural templating vs JSP 2 95
diffSum example 4 36
hibernate jars 4 26
For customizing the look of your lightweight component and making it look lucid like it was made of glass. Or: how to make your component more Apple-ish ;) This tip assumes your component to be of rectangular shape and completely opaque. (COD…
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now