• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to JTabel show more than 10 colums in JTable with resonable visual data at a time?

 
Piyush Patel
Ranch Hand
Posts: 127
Android Firefox Browser Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all,
i have 15 colums with JTable, that makes it too much bulky(visually having lot data to read).

what can be alternative?

i thought if can place (+)button or icon on starting of each row . so that when user clicks on that it expands and we will show 5 to 6 fields here in expanded view .

how to do this with JTable ?

please help.
thanks for your valuable help ;-)
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
couple of possibilities:
- turn autoResize off, then you'll get a horizontal scrollbar (depending on size of table's container)
- remove the extra columns from the table (not the model), add a +/- button somewhere,
which, when clicked adds the columns, or removes them again (if already added)
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1) If possible try to reorganize your data and UI.
e.g In typical mail clients, you get a table displaying the emails. Selecting one, shows the actual details in the "View" pane. This is a sort of drill down concept.
Something similar might be possible in your case

2) You can display multiple lines of data in a single cell. If possible you might want to considering reducing the number of columns and merging the data in some other column.
 
Piyush Patel
Ranch Hand
Posts: 127
Android Firefox Browser Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi, thanks for your suggestions
i want to make something like this exaple (demo)

there is exaple of +,- button and drop down row .
how to make it using jtable ?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!