This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes can you resize a JTable from UI? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "can you resize a JTable from UI?" Watch "can you resize a JTable from UI?" New topic
Author

can you resize a JTable from UI?

Kate Zoy
Ranch Hand

Joined: Feb 11, 2004
Posts: 33
I have a JFrame containing a JTable. When the program is running, I can resize the JFrame by clicking an end corner and dragging. I want to be able to do that with my JTable too... is that possible?
Thanks!!
Norm Miller
Ranch Hand

Joined: May 21, 2002
Posts: 56
Place a panel in the center of the Frame (Using the default BorderLayout).
Set the layout of the panel to Grid Layout.
Place your scrollbar(if any) there.
The table then goes on the scrollbar (or directly on the panel).
The grid seems to re-size the nicest.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: can you resize a JTable from UI?
 
Similar Threads
JTable
jtable
JTable
Resizing Jtable column
JTable size