posted 21 years ago
Vishal,
Here's a suggestion: Use a "JTable" with one column. Hide the "grid" lines (using method "setShowHorizontalLines()" in class "JTable"). Make the class of the column "Boolean" (see method "getColumnClass()" in interface "TableModel"). The default renderer for such a column is a "JCheckBox". Finally, place the "JTable" in a "JScrollPane". This should give you the desired effect.
Hope this has helped you.
Good Luck,
Avi.