Olá.
Estou querendo mostrar na minha frame dois labels diferentes, só que o valor do último atributo sempre apaga o 1º. Já tentei posicionar para opostos mas não funciona.
PS.: Ainda tenho problemas com a estrutura da linguagem, então meu código pode estar todo bagunçado.
JLabel label1 = new JLabel("Hello, Swing World", SwingConstants.RIGHT);
JLabel label2 = new JLabel("Good morning!", SwingConstants.LEFT);
JFrame frame = new JFrame("Juliana");
frame.getContentPane().add(label1);
frame.getContentPane().add(label2);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.pack();
frame.setVisible(true);
Espero que possam me corrigir e me ajudar 