I used a CardLayout
to create 2 panels. The one on the left hosts JButtons
, which when clicked, opens the corresponding website in the right panel. The problem is that I'm unable to place the buttons one on top of the other.
Please observe the screenshot below :-
You could use a
Box
set verticallyRun this example to see
Edit:
To add space int between use
createVerticleStrut()
in between the components