JLabel -example

Creating a JLabel with Text Example

Below code creates a Simple JLabel with Text Example using JLabel() constructor method.Note that JLabel class has several methods.  

Output:

ImageIcon

Add ImageIcon to a JLabel and center it

OutPut  

Java JLabel setBorder() Method Example

Java JLabel setBorder () Method Example

Below code shows how to use Java JLabel setBorder ()  Method Example

OutPut: See also: Java JLabel getText and JTextField setText methods

Jlabel-getText-method

Java JLabel getText and JTextField setText methods

Below code shows how to use JLabel getText method and JTextField setText method.

See also: How to create a simple JLabel with Text Simple java login JFrame window with Mysql Database connection.  

How to create a simple JLabel with Text

How to create a simple JLabel with Text

Below code shows how to create a simple JLabel with Text.