Login    New User    Forgot Password    Help      

Java Lable

Java Tutorials

Example

import java.awt.*;
import javax.swing.*;

public class swing1 extends JApplet
{

public void init()
{

Container contentPane = getContentPane();

ImageIcon ii = new ImageIcon("image1.jpg");

JLabel jl = new JLabel("France", ii, JLabel.CENTER);

contentPane.add(jl);
}
}

Output

Java Tutorials