Java – how to define the label position of JRadioButton on NetBeans?
•
Java
I want to define the label position of jradiobuttons on the buttonggroup on NetBeans so that the label is under its RadioButton OK?
Solution
Use JRadioButton #settext() with setverticaltextposition (swingconstants. Bottom)
JRadioButton jrb = new JRadioButton();
jrb.setText("Label");
jrb.setVerticalTextPosition(JRadioButton.BOTTOM);
jrb.setHorizontalTextPosition(JRadioButton.CENTER);
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码
