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.
的参数是int值,LEFT对应几,RIGHT对应几,这个枚举
对应关系是如何的呢?