• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Jj Roberts
  • Carey Brown
Bartenders:
  • salvin francis
  • Frits Walraven
  • Piet Souris

JTable in JScrollPane in JSplitPane

 
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
 
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.
 
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.
 
There is no "i" in denial. Tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic