• Post Reply Bookmark Topic Watch Topic
  • New Topic

JTable problem, please look into this  RSS feed

 
Karthik Guru
Ranch Hand
Posts: 1209
  • Mark post as helpful
  • send pies
  • 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.
 
burugupalli
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi friend
Your Problem may be solved by changing BorderLayOut to GridbagLayout
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!