Reputation:
I am using JScrollpane and adding buttons on it dynamically. JScrollpane does not allow use of layouts. I want to increase space vertically and horizontally between buttons.
Upvotes: 1
Views: 92
Reputation: 813
Add JPanel
to your JScrollPane
, and change the layout of the JPanel
.
After that, you can build all your gui inside your JPanel
without the limitation of JScrollPane
.
Upvotes: 1