How to align JLabel-JTextField pairs vertically

前端 未结 7 1147
独厮守ぢ
独厮守ぢ 2020-12-11 02:33

What I mean by a JLabel-JTextField pair is a JLabel component followed by a JTextField one, for example, \"Parameter 1: -----\" where \"-----\" denotes a blank JTextField.

7条回答
  •  伪装坚强ぢ
    2020-12-11 03:13

    or

    there is possible align just text inside JTextComponents with

    JLabel.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
    

提交回复
热议问题