posted 3 years ago
I have a JFrame where I created dynamically checkboxes and add them to a JPane. Here is the code:
Only 10 checkboxes can be seen on the screen. I should somehow set the window according to the number of checkboxes. I tried to use JScrollPane with following modifications:
and
Unfortunately, it did not help because the frame contains a button as well which will set the selected values and the JScrollePane did not contain the button.
Could someone suggest me a solution?