This week's book giveaway is in the OCAJP forum.
We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line!
See this thread for details.
Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JscrollPane

 
marko stone
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 196
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic