• Post Reply Bookmark Topic Watch Topic
  • New Topic

Resize JFrame = needs JTable columns to be resized  RSS feed

 
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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!