public class Label
extends Component
implements Accessible
Constructors | Description |
---|---|
Label() | Constructs an empty label. |
Label(String str) | Constructs the new label with the specified string of text, left justified. |
Label(String str, int alignment) | Constructs a new label that represents specified string of text with the specified alignment. |
public class JLabel
extends JComponent
implements SwingConstants, Accessible
Constructors | Description |
---|---|
JLabel() | Creates a JLabel instance with no image and with an empty string. |
JLabel(Icon image) | Create a JLabel with the specified image. |
JLabel(Icon image, int horizontalAlignment) | Creates a JLabel instance with the specified image and horizontal alignment. |
JLabel(Stirng str) | Creates a JLabel instance with the specified string. |
JLabel(String str, Icon icon, int horizontalAlignment) | Creates a JLabel instance with the specified string, image and horizontal alignment. |
JLabel(String str, int horizontalAlignment) | Create a JLabel instance with the specified text and horizontal alignment. |