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 | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
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: 595
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: 484

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.


PM Me If You Want to get Urgent Help on Java Programming
 
jQuery in Action, 2nd edition
 
subject: how to Set the size of the JTable
 
Similar Threads
Question about JTable
Can we set an image in a cell of a jtable.
JTable (Size and Colour)
How to Set the JTable Rows Color??
JTable