I have the following fragment of code, where a JLabel is not displayed unless I move the JFrame out of the screen and back in again. I tried to change the layout from null to BorderLayout or FloatLayout without much luck so far. Any ideas?
public class StartPage extends Main{
// Global variables
private JPasswordField passField = new JPasswordField();
private String infoLabel = "<html>Bla, bla some text</html>";
// CONSTRUCTOR
public StartPage() {
frame.setSize(1400, 1000);
frame.setLocationRelativeTo(null);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setVisible(true);
frame.setResizable(false);
startPage.setBounds(0, 0, 1400, 1000);
startPage.setLayout(null);
frame.getContentPane().add(startPage);
// TITLE LABEL
JLabel lblTitle = new JLabel("My Title");
lblTitle.setForeground(Color.RED);
lblTitle.setHorizontalAlignment(SwingConstants.CENTER);
lblTitle.setFont(new Font("Arial Black", Font.BOLD, 30));
lblTitle.setBounds(190, 150, 1000, 85);
startPage.add(lblTitle);
// TEXT LABEL
JLabel areaText = new JLabel(infoLabel, SwingConstants.CENTER);
areaText.setVerticalAlignment(SwingConstants.CENTER);
areaText.setBounds(315, 220, 750, 300);
areaText.setFont(new Font("Arial Black", Font.PLAIN, 15));
areaText.setVisible(true);
startPage.add(areaText);