Rotate your phone or change to desktop for better experience

Rotate your phone or change to desktop for better experience

Pgm 3 || Section B || Program which create and displays a message on the window

 import javax.swing.*;

import java.awt.*;

public class Pgm3

{

public static void main(String args[])

{

JFrame frame=new JFrame("Text using Label");

frame.setSize(500,500);

frame.setLayout(new FlowLayout());

JLabel label=new JLabel("Welcome to java GUI...");

frame.add(label);

frame.setVisible(true);

}

}

Post a Comment

0 Comments