File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes How to make JTable non docable? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "How to make JTable non docable?" Watch "How to make JTable non docable?" New topic
Author

How to make JTable non docable?

Saurabh S Pingle
Greenhorn

Joined: Oct 29, 2001
Posts: 3
Is there any way to make a JTable non-docable?
Chantal Ackermann
Ranch Hand

Joined: Sep 28, 2000
Posts: 508
what do you mean with _non_-docable? why don't you put the table in its own frame?
chantal
Saurabh S Pingle
Greenhorn

Joined: Oct 29, 2001
Posts: 3
Non docable means two Table columns cannot be swapped with their respective position.So if a Jtable has n number of columns one cannot change their position i.e column positions are fixed.
selvas kumars
Ranch Hand

Joined: Jan 06, 2001
Posts: 115
Hi Saurabh,
you can try out this one..
table.getTableHeader().setReorderingAllowed(false);
Regards,
silva.
Saurabh S Pingle
Greenhorn

Joined: Oct 29, 2001
Posts: 3
Thanx Selva. This solves my problem.
Thanx once again.
regds.,
Saurabh
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: How to make JTable non docable?