Working with Labels on Panels.
Hi, I’m new here and I have 2 questions.
1) I have added some labels into a panel and by default they all align in the center of the screen. How do I align them all to the left?
I have tried using the following but nothing works:
label = new JLabel(“text”, SwingConstants.LEFT);
2) I have one panel that contains 2 buttons and works like a main menu.
If the user clicks on a button a new panel must appear BELOW the panel of the main menu (I have lots of space below). However, the panel appears behind the main menu and therefore cannon be seen unless I set the visibility of the main menu to false.
Anyone knows how to show the panel below the first one? (so that I will always have the main menu visible)