• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

JTable problem, please look into this

 
Ranch Hand
Posts: 1209
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi all,
I'm using a JScrollPane to show the JTable.
The overall layout for the Frame is BorderLayout.
I have put the scroll pane in the center of BorderLayout.
Now when i start the application and populate the JTable, all the columns occupy the entire width of the frame.Population happens at a click of a button.
BUT,
if i maximize the frame and then populate then the columns do not expand to occupy the entire width of the frame.Looking forward to a solution from someone.
I have used this though where tblDisplay is the JTable instance.
tblDisplay.setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS);
thanks in advance
karthik.
 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi friend
Your Problem may be solved by changing BorderLayOut to GridbagLayout
 
reply
    Bookmark Topic Watch Topic
  • New Topic