Centre horizontalalignment JLabel

JLabel lab=new JLabel("text");
lab.setHorizontalAlignment(SwingConstants.LEFT);     
Itchy Ibex