File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes JCheckBoxes in the JScrollPane Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JCheckBoxes in the JScrollPane " Watch "JCheckBoxes in the JScrollPane " New topic
Author

JCheckBoxes in the JScrollPane

Priyatham Anisetty
Greenhorn

Joined: Apr 21, 2011
Posts: 15
Hi there,

I am new to java GUI stuff. I have a array of names say



I want to display them as checkBoxes in a JScrollPane. and have a button "Add" next to the scrollpanel. So when a user selects the contacts say 1,3,and5 and press the add button I want to get the names user selected and perform some action.

Any suggestions to add JCheckBox to JScrollPane is really appreciated.

*The testContacts is dynamic.

Thanks in Advance.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18121
    
    8

Well, normally you'd just add a JPanel to the JScrollPane, and then put other components into the JPanel in the usual way.


 
 
subject: JCheckBoxes in the JScrollPane
 
Similar Threads
Hard JTABLE Question
method on click in HREF Link
Header in JTable is not showing up.PLEASE...... IT IS URGENT
How I can compare an arraylists values in order?
adding JPanel to a JScrollPane