Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Scrollable Check Boxes

I need to make a scroll box that can contain an unknown number of elements. Namely it needs to be able to scroll. I'm not quite sure how to do this. Please help.enter image description here

like image 830
if_zero_equals_one Avatar asked May 23 '26 14:05

if_zero_equals_one


1 Answers

Use a JScrollPane with a JPanel wraped inside it. That way, you can add any number of elements to the JPanel without exceeding the panel's physical size using the JScrollPane.

Here is one part of the very famous oracle tutorial that explains the JScrollPane element: http://download.oracle.com/javase/tutorial/uiswing/components/scrollpane.html

I hope this helps!

like image 139
Sam Avatar answered May 25 '26 03:05

Sam



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!