jlabel text center code example Example: jlabel text center JLabel label = new JLabel("The Label", SwingConstants.CENTER);