当前位置: 技术问答>java相关
jb中的label或者textfield的左有对齐如何设置?
来源: 互联网 发布时间:2015-01-29
本文导语: 希望有源代码~~谢谢~~ | jLabel: setHorizontalAlignment public void setHorizontalAlignment(int alignment)Sets the alignment of the label's contents along the X axis. This is a JavaBeans bound property. Parameters: alignment ...
希望有源代码~~谢谢~~
|
jLabel:
setHorizontalAlignment
public void setHorizontalAlignment(int alignment)Sets the alignment of the label's contents along the X axis.
This is a JavaBeans bound property.
Parameters:
alignment - One of the following constants defined in SwingConstants: LEFT (the default for text-only labels), CENTER (the default for image-only labels), RIGHT, LEADING or TRAILING.
setHorizontalAlignment
public void setHorizontalAlignment(int alignment)Sets the alignment of the label's contents along the X axis.
This is a JavaBeans bound property.
Parameters:
alignment - One of the following constants defined in SwingConstants: LEFT (the default for text-only labels), CENTER (the default for image-only labels), RIGHT, LEADING or TRAILING.