Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JTable in JScrollPane in JSplitPane

 
Meyer Florian
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
G'day!
I have a JSplitPane.
That JSplitPane has a horizontal Divider.
In the top Panel, I have a JScrollPane with some content (JLabels, JTextFields etc.).
The Scrollbars are shown.
In the bottom Panel, I have a JScrollPane with a JTable in it.
The Scrollbars are NOT shown.
What am I doing wrong? ='(
Thanx for any help!
Praiser
 
Don Kiddick
Ranch Hand
Posts: 580
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The scroll bars will only show if the JTable is bigger than the JScrollPane it is "in".
D.
 
Don Kiddick
Ranch Hand
Posts: 580
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is unless you use the setHorizontalScrollBarPolicy and setVerticalScrollBarPolicy methods on JScrollPane.
D.
 
Eddie Vanda
Ranch Hand
Posts: 283
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I asked a similar question recently and the answer was to apply

(credit to Jason Steele).
It worked for me!
 
Meyer Florian
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
D, the table is bigger and the scrollbar policies are set to show always.
EV, doesn't work for my table, but I'll read ur other topic.
Thanks!
Praiser
 
Don Kiddick
Ranch Hand
Posts: 580
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sounds like you have a bug. Post your code.
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic