Advertisement
Guest User

Untitled

a guest
Feb 21st, 2014
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.80 KB | None | 0 0
  1. package main;
  2.  
  3. import java.awt.*;
  4. import java.awt.event.*;
  5. import javax.swing.*;
  6.  
  7. public class Main
  8. {
  9.         // Create a MakeFrame and makeMenu objects
  10.         MakeFrame createFrame = new MakeFrame();
  11.         MakeFileMenu makeMenu = new MakeFileMenu();
  12.  
  13.         public static void main(String[] args)
  14.         {
  15.             Main gui = new Main();
  16.             gui.start();
  17.         }
  18.  
  19.         public void start()
  20.         {
  21.             createFrame.makeFrame();
  22.             Container contentPane =  createFrame.frame.getContentPane();
  23.             createFrame.frame.setSize(300, 300);
  24.             createFrame.frame.setVisible(true);
  25.            
  26.             makeMenu.MakeMenu();
  27.         }
  28.  
  29.         public class newListener implements ActionListener
  30.         {
  31.             public void actionPerformed(ActionEvent e)
  32.             {
  33.                 JOptionPane.showMessageDialog(createFrame.frame,
  34.                         "The  File > New  menu option was clicked",
  35.                         "Menu Item Click", JOptionPane.INFORMATION_MESSAGE);
  36.             }
  37.         }
  38.  
  39.         public class saveListener implements ActionListener
  40.         {
  41.             public void actionPerformed(ActionEvent e)
  42.             {
  43.                 JOptionPane.showMessageDialog(createFrame.frame,
  44.                         "The  File > Save..  menu option was clicked",
  45.                         "Menu Item Click", JOptionPane.INFORMATION_MESSAGE);
  46.             }
  47.         }
  48.        
  49.         public class exitListener implements ActionListener
  50.         {
  51.             public void actionPerformed(ActionEvent e)
  52.             {
  53.                 System.exit(0);
  54.             }
  55.         }
  56.        
  57.         public class systemListener implements ActionListener
  58.         {
  59.             public void actionPerformed(ActionEvent e)
  60.             {
  61.                 JOptionPane.showMessageDialog(createFrame.frame,
  62.                         "GUI Pizza\n" +
  63.                         "Version 1.0\n" +
  64.                         "Build 1.0534534535-1746\n\n" +
  65.                         "(c) Copyright Jack Sparrow 2014\n" +
  66.                         "All rights reserved\n\n" +
  67.                         "Visit http://www.website.com/\n" +
  68.                         "Education To Go\n" +
  69.                         "Intermediate Java Course",
  70.                         "About GUI Pizza", JOptionPane.INFORMATION_MESSAGE);
  71.             }
  72.         }
  73. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement