Java JLabel Constructor's

Beginner java tutorial site is rehosted with updated content and useful information under the domain name javabeginner.com

javax.swing
Class JLabel

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjavax.swing.JComponent
              extended byjavax.swing.JLabel
All Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, Serializable, SwingConstants
Direct Known Subclasses:
BasicComboBoxRenderer, DefaultListCellRenderer, DefaultTableCellRenderer, DefaultTreeCellRenderer
 

JLabel Constructor

 

 

 

JLabel()
Creates a JLabel instance with no image and with an empty string for the title.


JLabel(Icon image)
Creates a JLabel instance with the specified image.


JLabel(Icon image, int horizontalAlignment)
Creates a JLabel instance with the specified image and horizontal alignment.


JLabel(String text)
Creates a JLabel instance with the specified text.


JLabel(String text, Icon icon, int horizontalAlignment)
Creates a JLabel instance with the specified text, image, and horizontal alignment.


JLabel(String text, int horizontalAlignment)
Creates a JLabel instance with the specified text and horizontal alignment.

 

Google
 
Web www.beginner-java-tutorial.com