Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Resize JFrame = needs JTable columns to be resized

 
George McCain
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am doing a custom JTable column sizing (one that supports static widths, and percentage widths) and this logic holds well when the UI is first displayed, but when the screen is resized the columnsWidth function needs to be called again.
Which method would that function get called in?
thanks
 
Abhik Sarkar
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi George,
Here is some code from an application in which I resize columns on resize of a window. The first part is from the main frame class which is derived from JFrame.

This is the actual resizing code (just in case it is of any use to you ;-) OTG.getInstance return a reference to the main frame of the application.
 
George McCain
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks ill take a look at that when I get home.
 
I think I'll just lie down here for a second. And ponder this tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!