• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Scroll Pane not visible on Frame window

 
vishwa venkat
Ranch Hand
Posts: 185
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic