Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Multiple JTables in a single Scrollpane

 
Abhinav Anand
Ranch Hand
Posts: 113
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,
Is it possible to maintain two jtables in a single scroll pane. Actually i am designing a drill down reporting system which requires me to display two completely different types of information side by side which inherit the fucntionality of two different jtables yet are scrollable through a single scroll pane. So the final system should look like.

Thanks in advance.
 
Idly Vada
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Vishal !
I don't think you can associate multiple tables with single scrollpane.
What you can do is to logically maintaining the contents in two virtual tables in single table.
But if you still want to go with multiple tables, you can associate two tables with two scrollpanes. Make one of them(scrollpane of left table) invisible) and create a bounded event between the two scrollpanes such that if one moves so does the other.
Hope this will solve the problem!
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What you could do if you REALLY wanted to is put both tables on a JPanel and put that JPanel in a JScrollPane.
Not sure what you can accomplish with 2 tables in 1 scrollpane that you can't accomplish with 1 table and 2 columns in a scrollpane though.
 
marko stone
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
i did this not long ago
i put all my jtables to jpanel and put it on jscrollpane
but i place jtables vertically
 
Abhinav Anand
Ranch Hand
Posts: 113
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,
Actually i have to show 2-3 columns on the left side and another 2-3 columns on the right side of the document. The multiple columns on the left side and the multiple columns on the right side should behave like singe columns. So the user can use left-right arrow keys to tab between them.

Actually i have to show T-Form balance sheet and profit and loss chart in tabular format. I have to show the Asset particulars and amount on the left side and the Libaility particulars and amount on the right side. The above report is backed by a drill down reporting system that gets activated when the user hightlights a particular item and then hits enter or double clicks on the item.
Has anybody tried this or has any idea as to how can i implement the above system using jtables ?
Thanks in advance.
[ September 15, 2003: Message edited by: Vishal Sinha ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!