Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.awt.*;
- import java.awt.event.*;
- import java.io.*;
- import java.util.*;
- public class home extends EasyApp
- {
- public static void main(String[] args)
- { new home(); }
- Label lCasPage = addLabel("H O M E",250,50,250,50,this);
- Button bCoordinator = addButton("LOG-IN",100,190,150,50,this);
- Button bStudent = addButton("SEARCH CARS",350,190,150,50,this);
- Menu principalMenu = addMenu("Option|Help|Quit");
- public home()
- {
- setBackground(new Color(50,160,150));
- lCasPage.setBackground(new Color(50,160,150));
- lCasPage.setForeground(new Color(255,255,255));
- lCasPage.setFont(new Font("Courier New",3,16));
- setTitle("YO");
- }
- public void actions(Object source,String command)
- {
- if(command.equals("Option|Help"))//this command is used to show the HELP form
- {
- String helpdata = "";
- 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"
- + "- THE 'SEARCH CARS' BUTTON ALLOWS ONE TO SEARCH FOR CARS ALREADY IN THE DATABASE.";
- new Help(helpdata);
- }
- if(command.equals("Option|Quit"))
- {
- System.exit(0);
- }
- if(source == bCoordinator)
- {
- new Logins();
- this.dispose();
- }
- if (source == bStudent)
- {
- new search();
- this.dispose();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment