This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach 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 Murach's Java Servlets and JSP this week in the Servlets 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
 
Consider Paul's rocket mass heater.
 
subject: Scroll Pane not visible on Frame window
 
Similar Threads
how to add a scrollpane...
Scrollbar for jtable
JScrollPane Pseudo Auto-Scroll
JScrollerPane
Adding ScrollPane to JPanel