File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
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));
I agree. Here's the link:
subject: Add Components in JScrollPane
jQuery in Action, 3rd edition