Click here to Skip to main content
15,899,313 members
Home / Discussions / Java
   

Java

 
AnswerRe: EOF in BufferedReader Pin
David Skelly8-Jan-10 1:40
David Skelly8-Jan-10 1:40 
AnswerRe: EOF in BufferedReader Pin
Richard MacCutchan8-Jan-10 5:12
mveRichard MacCutchan8-Jan-10 5:12 
GeneralRe: EOF in BufferedReader Pin
002comp10-Jan-10 19:32
002comp10-Jan-10 19:32 
GeneralRe: EOF in BufferedReader Pin
Richard MacCutchan10-Jan-10 23:20
mveRichard MacCutchan10-Jan-10 23:20 
GeneralRe: EOF in BufferedReader Pin
002comp10-Jan-10 23:58
002comp10-Jan-10 23:58 
Question[Solved]Fatal Exception occured when running jar file [modified] Pin
Jordanwb7-Jan-10 3:17
Jordanwb7-Jan-10 3:17 
AnswerRe: Fatal Exception occured when running jar file Pin
Richard MacCutchan7-Jan-10 4:52
mveRichard MacCutchan7-Jan-10 4:52 
GeneralRe: Fatal Exception occured when running jar file Pin
Jordanwb7-Jan-10 7:16
Jordanwb7-Jan-10 7:16 
jordanwb@jordanwb-laptop:/media/DEFB-0C36/PhpDesigner$ java -jar PhpDesigner.jar 
Exception in thread "main" java.lang.NoSuchMethodError: main


The main method does exist in the startup class. Confused | :confused:

import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
import java.util.*;

public class MainWindow extends JFrame implements ActionListener
{
    private JMenuBar main_menu;
    
    private JMenu file_menu;
    private JMenuItem new_project, open_project, save_project, save_project_as, quit;
    
    private JMenu objects_menu;
    private JMenuItem add_folder, add_file, add_class, add_interface, add_function, add_parameter, add_field;
    
    private JPanel php_object_manager;
    
    public MainWindow()
    {
        super ("PhpDesigner");
        
        this.setSize (800, 600);
        this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        
        /* Set up main menu */
        /* Set up file menu */
        this.new_project = new JMenuItem("New Project", new ImageIcon ("./Images/document-new.png"));
        this.new_project.addActionListener (this);
        
        this.open_project = new JMenuItem("Open Project", new ImageIcon ("./Images/document-open.png"));
        this.open_project.addActionListener (this);
        
        this.save_project = new JMenuItem("Save Project", new ImageIcon ("./Images/document-save.png"));
        this.save_project.addActionListener (this);
        
        this.save_project_as = new JMenuItem("Save Project As", new ImageIcon ("./Images/document-save-as.png"));
        this.save_project_as.addActionListener (this);
        
        this.quit = new JMenuItem("Quit", new ImageIcon ("./Images/system-log-out.png"));
        this.quit.addActionListener (this);
        
        this.file_menu = new JMenu ("File");
        this.file_menu.add (this.new_project);
        this.file_menu.addSeparator();
        this.file_menu.add (this.open_project);
        this.file_menu.add (this.save_project);
        this.file_menu.add (this.save_project_as);
        this.file_menu.addSeparator();
        this.file_menu.add (this.quit);
        
        this.main_menu = new JMenuBar ();
        this.main_menu.add (this.file_menu);
        
        this.getContentPane().add (this.main_menu, BorderLayout.NORTH);
        /* End of setting up file menu */
        /* Set up Objects menu */
        
        this.add_folder = new JMenuItem ("Add Folder");
        this.add_file = new JMenuItem ("Add File");
        this.add_class = new JMenuItem ("Add Class");
        this.add_interface = new JMenuItem ("Add Interface");
        this.add_function = new JMenuItem ("Add Function");
        this.add_parameter = new JMenuItem ("Add Parameter");
        this.add_field = new JMenuItem ("Add Field");
        
        this.objects_menu = new JMenu ("Objects");
        this.objects_menu.add (this.add_folder);
        this.objects_menu.add (this.add_file);
        this.objects_menu.add (this.add_class);
        this.objects_menu.add (this.add_interface);
        this.objects_menu.add (this.add_function);
        this.objects_menu.add (this.add_parameter);
        
        this.main_menu.add (this.objects_menu);
        /* End of setting up objects menu */
        /* End of setting up main menu */
                
        this.setVisible (true);
    }
    
    public void actionPerformed(ActionEvent e)
    {
        Object source = e.getSource ();
        
        if (source == this.new_project) {  }
        else if (source == this.save_project) {  }
        else if (source == this.save_project_as) {  }
        else if (source == this.quit)
        {
            System.exit(0);
        }
    }
    
    public static void main ()
    {
        new MainWindow ();
    }
}

GeneralRe: Fatal Exception occured when running jar file Pin
Richard MacCutchan7-Jan-10 9:01
mveRichard MacCutchan7-Jan-10 9:01 
GeneralRe: Fatal Exception occured when running jar file Pin
Jordanwb7-Jan-10 9:32
Jordanwb7-Jan-10 9:32 
GeneralRe: Fatal Exception occured when running jar file Pin
Richard MacCutchan7-Jan-10 9:40
mveRichard MacCutchan7-Jan-10 9:40 
GeneralRe: Fatal Exception occured when running jar file Pin
Jordanwb7-Jan-10 9:53
Jordanwb7-Jan-10 9:53 
GeneralRe: Fatal Exception occured when running jar file Pin
Richard MacCutchan7-Jan-10 10:03
mveRichard MacCutchan7-Jan-10 10:03 
GeneralRe: Fatal Exception occured when running jar file Pin
Jordanwb7-Jan-10 10:11
Jordanwb7-Jan-10 10:11 
GeneralRe: Fatal Exception occured when running jar file Pin
Richard MacCutchan7-Jan-10 23:33
mveRichard MacCutchan7-Jan-10 23:33 
GeneralRe: Fatal Exception occured when running jar file Pin
Jordanwb8-Jan-10 2:49
Jordanwb8-Jan-10 2:49 
GeneralRe: Fatal Exception occured when running jar file Pin
Richard MacCutchan8-Jan-10 4:31
mveRichard MacCutchan8-Jan-10 4:31 
GeneralRe: Fatal Exception occured when running jar file Pin
Jordanwb8-Jan-10 4:34
Jordanwb8-Jan-10 4:34 
GeneralRe: Fatal Exception occured when running jar file Pin
Richard MacCutchan8-Jan-10 4:56
mveRichard MacCutchan8-Jan-10 4:56 
QuestionMouseZoom Pin
002comp6-Jan-10 19:13
002comp6-Jan-10 19:13 
Questionreq coding in java Pin
thileebandr4-Jan-10 23:25
thileebandr4-Jan-10 23:25 
AnswerRe: req coding in java Pin
Richard MacCutchan4-Jan-10 23:31
mveRichard MacCutchan4-Jan-10 23:31 
QuestionSome exception Problem Pin
002comp4-Jan-10 22:27
002comp4-Jan-10 22:27 
AnswerRe: Some exception Problem Pin
Richard MacCutchan4-Jan-10 22:41
mveRichard MacCutchan4-Jan-10 22:41 
GeneralRe: Some exception Problem Pin
002comp4-Jan-10 23:10
002comp4-Jan-10 23:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.