I'm relatively new to java swing, so I don't know to change the menu component in swing with a vertical one.
CodePudding user response:
If you want a side menu with buttons, I imagine you probably want to use a JPanel with GridLayout. Something like:
JPanel p = new JPanel();
p.setLayout(new GridLayout(2,2));
Jlabel l = new JLabel("a");
p.add(l);
JButton btn = new JButton("click");
p.add (btn);
l = new JLabel("b");
p.add(l);
btn = new JButton("click");
p.add (btn);