File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes how to Set the size of the JTable Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Reply Bookmark "how to Set the size of the JTable" Watch "how to Set the size of the JTable" New topic
Author

how to Set the size of the JTable

kumar shiva
Greenhorn

Joined: Jul 04, 2012
Posts: 12

Hello,

Could any one please tell me how to set the Size of the JTable.(to increase the size of the Table).

Thanks,
Shiva
Himai Minh
Ranch Hand

Joined: Jul 29, 2012
Posts: 289
You mean how many rows of a JTable?

Maybe, create the DefaultTableModel, set the JTable's table model, put additional data to the model. Then the JTable is expanded.
Usually,JTable has no idea about your data. DefaultTableModel deals with your data and JTable only deals with the display of the model.
Nam Ha Minh
Ranch Hand

Joined: Oct 31, 2011
Posts: 346

kumar shiva wrote:
Hello,

Could any one please tell me how to set the Size of the JTable.(to increase the size of the Table).

Thanks,
Shiva


To change the size of the table, you should change the size of the JScrollPane which wraps the table.


Job Offer: Online working Java technical writing
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to Set the size of the JTable
 
Similar Threads
How to Set the JTable Rows Color??
JTable (Size and Colour)
JTable
Can we set an image in a cell of a jtable.
Question about JTable