How to align JLabel to the left of the JPanel?

后端 未结 2 1751
伪装坚强ぢ
伪装坚强ぢ 2021-02-15 12:50

I want to align my JLabel to the left.

    String lText = \"mybook<         


        
2条回答
  •  执念已碎
    2021-02-15 13:14

    FlowLayout uses CENTER alignment by default. Try using LEFT alignment for your JLabel JPanel container

    myJPanel.setLayout(new FlowLayout(FlowLayout.LEFT));
    

提交回复
热议问题