Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7579487
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T17:41:35+00:00 2026-05-30T17:41:35+00:00

I recently updated the SwingX library in an application from version 1.0 to 1.6.2

  • 0

I recently updated the SwingX library in an application from version 1.0 to 1.6.2 since we updated to JDK1.6 . I know the sorting has been changed to re-use some of the Core JDK components which were introduced in JDK 1.6 .

However, in version 1.0 it was possible to sort a column by clicking on the header, subsequent clicks reverted the sort order, and shift click removed the sorting and reverted back to the original order. After the update to version 1.6.2, the shift click behavior is no longer present.

A small sample

import org.jdesktop.swingx.JXTable;

import javax.swing.JFrame;
import javax.swing.JScrollPane;
import javax.swing.table.DefaultTableModel;
import java.awt.EventQueue;

public class JXTableSortingTest {
  public static void main( String[] args ) {
    EventQueue.invokeLater( new Runnable() {
      public void run() {
        initUI();
      }
    } );
  }

  private static void initUI(){
    JFrame testFrame = new JFrame( "TestFrame" );
    JXTable table = new JXTable(  );
    DefaultTableModel model =
        new DefaultTableModel( new Object[][]{ new Object[]{"A"}, new Object[]{"B"}, new Object[]{"C"}, new Object[]{"D"}, new Object[]{"E"} }, new Object[]{"Click me"} );
    table.setModel( model );

    testFrame.getContentPane().add( new JScrollPane( table ) );

    testFrame.pack();
    testFrame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
    testFrame.setVisible( true );
  }
}

Running this sample with version 1.0 allows to remove the column sorting with a shift-click on the header, and with the 1.6.2 version this no longer works.

I checked the docs but did not encounter anything to switch this behavior back on. So before I start adding this functionality I though I asked it here if anybody knows an easy way to re-introduce the shift-click behavior

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T17:41:37+00:00Added an answer on May 30, 2026 at 5:41 pm

    it’s not supported, at least not in the exact same way as in 1.0.

    The nearest you can come with default support is to set the sortOrderCycle property on the JTable, then repeated clicks will cycle through those states for the column which is clicked:

    table.setSortOrderCycle(ASCENDING, DESCENDING, UNSORTED);
    

    This differs from the old behaviour in that the old removed all sorts – if you need that, a custom mouseListener which resets the sort keys is the way to go.

    Plus you might consider filing a feature request in the SwingX issue tracker and start a discussion over on the SwingLabs forum: the main reason we decided to drop it, was consistency with core behaviour. And as nobody barked, it was left at that 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I recently updated my version of Matlab and since then I have been getting
In our application we use several dynamically linked libraries. We recently updated the version
I recently updated an application from VS2003 to VS2008 and I knew I would
I've recently updated an application to the 3.5 framework (from 2.0). The app links
I've recently updated my Internet Explorer version from 8 to 9. Now, I'm getting
I recently updated my sbt setup to version 0.11. As you may know, new
I have recently updated jQuery from 1.6 to 1.7 and the following has stopped
I recently updated my application to use the iOS 5.0 SDK. Within it, I
My website www.uksoccershop.com has been recently updated by my team to show image thumbnails
Recently updated Twisted from 11 to 12 version. Discovered that the twisted.enterprise.util module no

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.