NeelP

Untitled

Mar 25th, 2012
8
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import java.awt.*;
  2. import java.awt.event.*;
  3. import java.io.*;
  4. import java.util.*;
  5.  
  6. public class home extends EasyApp
  7. {
  8.     public static void main(String[] args)
  9.     { new home(); }
  10.     Label lCasPage = addLabel("H O M E",250,50,250,50,this);
  11.     Button bCoordinator = addButton("LOG-IN",100,190,150,50,this);
  12.     Button bStudent = addButton("SEARCH CARS",350,190,150,50,this);
  13.     Menu principalMenu = addMenu("Option|Help|Quit");
  14.     public home()
  15.     {
  16.         setBackground(new Color(50,160,150));
  17.         lCasPage.setBackground(new Color(50,160,150));
  18.         lCasPage.setForeground(new Color(255,255,255));
  19.         lCasPage.setFont(new Font("Courier New",3,16));
  20.         setTitle("YO");
  21.     }
  22.     public void actions(Object source,String command)
  23.     {
  24.         if(command.equals("Option|Help"))//this command is used to show the HELP form
  25.         {
  26.             String helpdata = "";
  27.             helpdata = "- THE 'LOG-IN' BUTTON ALLOWS ONE TO LOG-IN TO USE ADVANCED FEATURES SUCH AS ADDING, EDITING, AND DELETING CARS FROM THE DATABASE." + "\n" + "" + "\n"
  28.             + "- THE 'SEARCH CARS' BUTTON ALLOWS ONE TO SEARCH FOR CARS ALREADY IN THE DATABASE.";
  29.             new Help(helpdata);
  30.         }
  31.         if(command.equals("Option|Quit"))
  32.         {
  33.             System.exit(0);
  34.         }
  35.         if(source == bCoordinator)
  36.         {
  37.             new Logins();
  38.             this.dispose();
  39.         }
  40.         if (source == bStudent)
  41.         {
  42.             new search();
  43.             this.dispose();
  44.         }
  45.     }
  46. }
Advertisement
Add Comment
Please, Sign In to add comment