Sunday, 8 September 2013

java swing program for displaying a label

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

/* <applet code="JLabelDemo" width=355 height=200>

public class JLabelDemo extends JApplet{

public void init() {
// Get content pane
Container contentPane = getContentPane();

// Create an icon
ImageIcon ii = new ImageIcon("sateesh.jpg");

// Create a label
JLabel jl = new JLabel ("SATEESH.BAGADHI", ii, JLabel.CENTER);

// Add label to the content pane