• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

swing - JPanel ,JScrollPane

 
Zhi Gang
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have one JPanel with submit buttons and a JScrollPane which consists of JTable. i am trying to add both inside a big JPanel, so that i can add the big jPanel into one of the JTabbedPane. however it start to behave really strange ie. the scroll bar JScrollPane gone missing, size of JScrollPane incorrect...

so my question is :-
is that possible i add a JScrollPane into and JPanel?
 
Andrew Monkhouse
author and jackaroo
Marshal Commander
Pie
Posts: 12007
215
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Zhi,
Certainly you can add a JScrollPane into a JPanel.
The Sun Swing tutorial has a section on JScrollPanel, which inclueds the following topics:
  • How a Scroll Pane Works
  • Setting the Scroll Bar Policy
  • Providing Custom Decorations
  • Implementing a Scrolling-Savvy Client
  • Sizing a Scroll Pane
  • Dynamically Changing the Client's Size
  • The Scroll Pane API
  • Examples that Use Scroll Panes


  • Regards, Andrew
     
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic