Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package main;
- import java.awt.*;
- import java.awt.event.*;
- import javax.swing.*;
- public class Main
- {
- // Create a MakeFrame and makeMenu objects
- MakeFrame createFrame = new MakeFrame();
- MakeFileMenu makeMenu = new MakeFileMenu();
- public static void main(String[] args)
- {
- Main gui = new Main();
- gui.start();
- }
- public void start()
- {
- createFrame.makeFrame();
- Container contentPane = createFrame.frame.getContentPane();
- createFrame.frame.setSize(300, 300);
- createFrame.frame.setVisible(true);
- makeMenu.MakeMenu();
- }
- public class newListener implements ActionListener
- {
- public void actionPerformed(ActionEvent e)
- {
- JOptionPane.showMessageDialog(createFrame.frame,
- "The File > New menu option was clicked",
- "Menu Item Click", JOptionPane.INFORMATION_MESSAGE);
- }
- }
- public class saveListener implements ActionListener
- {
- public void actionPerformed(ActionEvent e)
- {
- JOptionPane.showMessageDialog(createFrame.frame,
- "The File > Save.. menu option was clicked",
- "Menu Item Click", JOptionPane.INFORMATION_MESSAGE);
- }
- }
- public class exitListener implements ActionListener
- {
- public void actionPerformed(ActionEvent e)
- {
- System.exit(0);
- }
- }
- public class systemListener implements ActionListener
- {
- public void actionPerformed(ActionEvent e)
- {
- JOptionPane.showMessageDialog(createFrame.frame,
- "GUI Pizza\n" +
- "Version 1.0\n" +
- "Build 1.0534534535-1746\n\n" +
- "(c) Copyright Jack Sparrow 2014\n" +
- "All rights reserved\n\n" +
- "Visit http://www.website.com/\n" +
- "Education To Go\n" +
- "Intermediate Java Course",
- "About GUI Pizza", JOptionPane.INFORMATION_MESSAGE);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement