🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.jbuilder.java.swing
2 messages
2 total messages Started by Richard M. Ulrich Mon, 21 Mar 2005 02:40
Prevent user from moving jtable columns
#614
Author: Richard M. Ulrich
Date: Mon, 21 Mar 2005 02:40
12 lines
1346 bytes
Hello,

I have a JTable embedded in a JScrollPane, and just realized that the user 
can drag columns to change their ordering.  This would be a Bad Thing to 
happen, but I don't see how to disable the feature.  I've tried 
setColumnSelectionAllowed(false) thinking if they can't select a column they 
can't move it, but that didn't work.

What's the secret to making sure the columns are not rearranged by the user?

Thanks,
Richard
Re: Prevent user from moving jtable columns
#615
Author: Richard M. Ulrich
Date: Mon, 21 Mar 2005 03:34
4 lines
1084 bytes
The answer to my own question, found on google at 
http://www.chka.de/swing/table/faq.html:

table.getTableHeader().setReorderingAllowed(false);
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads