THE GUI DESIGN
/*This program gives basic GUI design.*/
//some import statment for GUI & Handling event
import javax.swing.*;
import java.awt.event.*;
public class gui extends JFrame implements ActionListener
{
JLabel msg;
JLabel no;
JTextField text;
JTextArea ta;
JButton b;
public gui(String title)
{
super(title);
msg = new JLabel("");
no = new JLabel("Enter NO: ");
text = new JTextField("",10);
ta = new JTextArea(2,30);
b=new JButton("SUBMIT");
setLayout(new FlowLayout());
add(no);
add(text);
add(msg);
add(ta);
add(b);
b.addActionListener(this);
}
public void actionPerformed(ActionEvent e)
{
//write code for after pressing Button
}
public static void main(String[] args)
{
JFrame a=new gui("gui");
a.setSize(350,300);
a.setVisible(true);
}
}