*
The moose likes Swing / AWT / SWT and the fly likes JscrollPane 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 "JscrollPane" Watch "JscrollPane" New topic
Author

JscrollPane

marko stone
Greenhorn

Joined: Oct 16, 2002
Posts: 23
hello
in my JDialog i can have a lot of components
and they don't display at. I'm trying to use
JScrollPane for it, but all i have simple dot in my JDialog window why ???
how i can resolve my problem ?

JScrollPane jsp;
...
jsp=new JScrollPane();
jsp.add(component1,gbc);
...
jsp.add(b,gbc);
this.getContentPane().add(jsp);

thanks
Rene Liebmann
Ranch Hand

Joined: May 02, 2002
Posts: 196
As I know, you can add only one component in your JScrollPane, so please put all your components in a JPanel and add the JPanel to the JScrollPane. This will work.
 
Consider Paul's rocket mass heater.
 
subject: JscrollPane
 
Similar Threads
jtables[]
JTable viewing problem
scrolling a texfield
JScrollpane problem
Make Line Graph scrollable in a JScrollPane?