This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes Scroll Pane not visible on Frame window Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Scroll Pane not visible on Frame window" Watch "Scroll Pane not visible on Frame window" New topic
Author

Scroll Pane not visible on Frame window

vishwa venkat
Ranch Hand

Joined: Nov 22, 2003
Posts: 185
I have a class extending from JFrame.
I created a JPanel and created a JscrollPane like foll..

panelInput=new JPanel();
scrollPane = new JScrollPane(panelInput);
scrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
getContentPane().add(scrollPane);
The scrollpane is not visible when i execute the program..what may be happened??
any help??
Jose Botella
Ranch Hand

Joined: Jul 03, 2001
Posts: 2120
Welcome to the Ranch visu.
No problem at all. Call setSize and setVisible on the parent container.
[ November 23, 2003: Message edited by: Jose Botella ]

SCJP2. Please Indent your code using UBB Code
 
Don't get me started about those stupid light bulbs.
 
subject: Scroll Pane not visible on Frame window
 
Similar Threads
how to add a scrollpane...
Scrollbar for jtable
Adding ScrollPane to JPanel
JScrollPane Pseudo Auto-Scroll
JScrollerPane