• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

JTableHeader column selection

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is a snippet that I am using to catch which column header is being selected.


The problem is when the user wants to resize the column width. Since Microsoft Excel allows the user to double-click between the columns to resize, if the user tries this the mouse listener is being triggered and the column is being sorted (but not resized).

Any idea on how I can determine if the mouse is being held between two columns (cursor changes to <--> instead of the default cursor)?
 
Ranch Hand
Posts: 1535
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This seems to work okay.
 
Greg Keene
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
perfect...I never thought about consuming the event...and I really never thought about checking for the cursor type.

thank you.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!