Meaningless Drivel is fun!
The moose likes Swing / AWT / SWT and the fly likes Add Components in JScrollPane Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Add Components in JScrollPane" Watch "Add Components in JScrollPane" New topic

Add Components in JScrollPane

vinay vishal

Joined: Dec 29, 2006
Posts: 9
Hi all,

I want to add multiple no of radio button in scroll pane. when i am adding N number of radio button Scrollbar doesn't work.

Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
give the scrollpane a preferredSize

scrollPane.setPreferredSize(new Dimension(x,y));
subject: Add Components in JScrollPane
It's not a secret anymore!