• Post Reply Bookmark Topic Watch Topic
  • New Topic

JTableHeader Problem

 
Avi Abrami
Ranch Hand
Posts: 1141
1
Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Greetings,
When the mouse cursor is over the boundary between the headers of two adjacent [J]table columns, it changes to a double headed arrow, indicating that the column width can be changed by dragging the mouse.
In my swing application this is not happening.
I added calls to "System.out.println()" in my code via mouse and mouse motion listeners in order to try and discover the reason for this behavior.
After adding the calls, suddenly the mouse cursor began behaving properly.
Hence I removed the calls.
However, after removing the calls, the mouse cursor again did not behave properly.
What could be causing this behavior?
Note that the "resizingAllowed" property of class "JTableHeader" is set to "true" (i.e. the default value).

Thanks (in advance),
Avi.
 
Rob Spoor
Sheriff
Posts: 20820
68
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you please post an SSCCE that displays the problem?
 
Avi Abrami
Ranch Hand
Posts: 1141
1
Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't think a SSCCE is possible without posting a large percentage of the entire application code.
I was hoping that someone reading this post would be familiar with the behavior I describe and be able to help me in some way.
 
Avi Abrami
Ranch Hand
Posts: 1141
1
Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Part of the application is provided by a third party.
Turns out that their code filters out events posted to Swing's event dispatch queue.
Once the third party modified that part of their code, the problem went away.
 
Rob Spoor
Sheriff
Posts: 20820
68
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for sharing the solution
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!