import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.font.*; import javax.swing.event.*; import javax.swing.Action; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JMenu; import javax.swing.JMenuBar; import javax.swing.JMenuItem; import javax.swing.JPanel; import javax.swing.JTextArea; import javax.swing.JTextField; import java.util.Calendar; public class Cvs extends JFrame implements ActionListener { private static final long serialVersionUID = 1L; static private int slno,wayBillNo,pcs; static private double weight; static private String destination,consigneeName,receivedBy,statusSescription,refefence,relation; static private Calender sendingDate,statusDeliveryDate; private JPanel panel; static JButton addButton,editButton,saveButton,exitButton; static JTextField label1,label2,label3,label4,label5; static JLabel first,second,thard,four,five; public Cvs() { setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); setTitle("Works PLace"); setSize(1350,750); setResizable(false); setLocationRelativeTo(null); panel = new JPanel(); setSize(1350,750); panel.setLayout(null); JMenuBar bar = new JMenuBar(); JMenu file = new JMenu("File"); JMenuItem close = new JMenuItem("Close"); JMenuItem save = new JMenuItem("Save"); JMenuItem saveas = new JMenuItem("Saveas"); JMenuItem print = new JMenuItem("Print"); JMenu edit= new JMenu("Edit"); JMenuItem copy=new JMenuItem("Copy"); JMenuItem past=new JMenuItem("Past"); JMenuItem delete=new JMenuItem("Delete"); JMenuItem allselect=new JMenuItem("AllSelect"); JMenu help = new JMenu("Help"); JMenuItem about = new JMenuItem("About"); JMenuItem shortcut = new JMenuItem("ShortCut"); file.add(close); file.add(save); file.add(saveas); file.add(print); edit.add(copy); edit.add(past); edit.add(delete); edit.add(allselect); help.add(about); help.add(shortcut); first=new JLabel("Customers Address"); first.setSize(200,170); first.setLocation(10,0); second=new JLabel("Issue Of Date"); second.setSize(200,170); second.setLocation(450,0); thard=new JLabel("Inward AWB"); thard.setSize(170, 298); thard.setLocation(10,0); four=new JLabel("Issue AWB"); four.setSize(200,170); four.setLocation(450, 68); five=new JLabel("Reference"); five.setSize(160, 450); five.setLocation(10,0); addButton = new JButton("Add"); addButton.setSize(90,50); addButton.setLocation(15, 550); editButton = new JButton("Edit"); editButton.setSize(90,50); editButton.setLocation(110,550); saveButton = new JButton("Save"); saveButton.setSize(90, 50); saveButton.setLocation(205,550); exitButton = new JButton("Exit"); exitButton.setSize(90,50); exitButton.setLocation(300,550); label1 = new JTextField(); label1.setSize(250,65); label1.setLocation(150,70); label1.setFont(new Font("Arial", Font.CENTER_BASELINE,12)); label1.setEditable(true); label2 = new JTextField(); label2.setSize(150,30); label2.setLocation(550,70); label2.setFont(new Font("Arial", Font.BOLD,12)); label2.setEditable(true); label3 = new JTextField(); label3.setSize(150,30); label3.setLocation(150,140); label3.setFont(new Font("Arial", Font.BOLD,24)); label3.setEditable(true); label4 = new JTextField(); label4.setSize(150,30); label4.setLocation(550,140); label4.setFont(new Font("Arial", Font.BOLD,24)); label4.setEditable(true); label5 = new JTextField(); label5.setSize(150,30); label5.setLocation(150,210); label5.setFont(new Font("Arial", Font.BOLD,24)); label5.setEditable(true); panel.add(label1); panel.add(label2); panel.add(label3); panel.add(label4); panel.add(label5); panel.add(addButton); panel.add(editButton); panel.add(saveButton); panel.add(exitButton); panel.add(first); panel.add(second); panel.add(thard); panel.add(four); panel.add(five); add(panel); addButton.addActionListener(this); editButton.addActionListener(this); saveButton.addActionListener(this); exitButton.addActionListener(this); add(panel); bar.add(file); setJMenuBar(bar); bar.add(edit); bar.add(help); } @Override public void actionPerformed(ActionEvent e) { if(e.getSource()==exitButton){ System.exit(0); } } }