How to prevent change the column order in JTable?

R

RC

So I have successfully to prevented JTable
cell editing, resize the column size,
column and row selection.

But I haven't figured out how to prevent
dragging a column from one place to other place.

If you know how to prevent column reordering (dragging)
in JTable, please let me know.

Thank Q very much in advance!
 
M

Michael Jung

RC said:
So I have successfully to prevented JTable
cell editing, resize the column size,
column and row selection.
But I haven't figured out how to prevent
dragging a column from one place to other place.
If you know how to prevent column reordering (dragging)
in JTable, please let me know.

RTFM: JTableHeader

Michael
 
T

Thomas Fritsch

RC said:
So I have successfully to prevented JTable
cell editing, resize the column size,
column and row selection.

But I haven't figured out how to prevent
dragging a column from one place to other place.

If you know how to prevent column reordering (dragging)
in JTable, please let me know.

Thank Q very much in advance!
Learn to use the API docs! You'll find it at
http://java.sun.com/j2se/1.5.0/docs/api/
 
R

Roedy Green

So I have successfully to prevented JTable
cell editing, resize the column size,
column and row selection.

But I haven't figured out how to prevent
dragging a column from one place to other place.

If you know how to prevent column reordering (dragging)
in JTable, please let me know.

Thank Q very much in advance!

JTable is one of the more complicated widgets. You need to skim all
the docs so you get an idea of what sorts of things you can do. Then
later when you are doing your design, you build around what you know
is possible. Only when you get around to writing the piece of
detailed code do you then need to read the API with fine tooth comb.
Then you can forget it. When you have similar problems, you scour
your existing code base.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top