Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


JTable column problem

Posted on 2004-09-13
Medium Priority
Last Modified: 2008-02-01
My program use JTable to show information in form of table.

Is it possible to disable column swapping feature such that user can only resize the column size, but he/she cannot swapping the columns (eg. swapping column one to column four by drag-and-drop). How to achieve it ?

Question by:glogin
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 35

Accepted Solution

girionis earned 200 total points
ID: 12041827

LVL 18

Expert Comment

ID: 12041840
For restricting column movement use

For restricting column resizing use

For individual column resizing use

    NOTE:This does not work (due to a feature) prior to the Java 2 Platform, Standard Editiion, version 1.3 (Kestrel).

LVL 37

Expert Comment

ID: 12041843
JTableHeader.setReorderingAllowed(boolean reorderingAllowed)

          Sets whether the user can drag column headers to reorder columns.

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
Suggested Courses

670 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