Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to implement expand/collapse nature to JTables in java swing application

In my application i am displaying a list of tables with huge data. All of the tables may not fit in the window, we need to scroll to see the bottom tables. Here i need expand/collapse nature to the tables. User may select which tables he would like to see among all of the tables. This is my sample screen shot of the application. enter image description here

How can i do it. Any suggestions would be greatly appreciated.

like image 971
Dyapa Srikanth Avatar asked May 10 '11 06:05

Dyapa Srikanth


1 Answers

  1. You can try JXTreeTable or TreeTable

  2. or you can switch jtable's visibility to make a expand/collapse effect. First when it is visible and use selects collapse use setVisible(false); and do reverse in expand. [Not sure this will work or not.]

like image 170
Harry Joy Avatar answered Oct 19 '22 14:10

Harry Joy