can any one help JFrame

Just stated learning Java. trying to create a java EmailFrame which will display a blank Submission Complete message.

but i keep getting error message when ever I try to compile the code.

error (Can not find symbol symbol method submit)

this is what my script looks like

import java.awt.*;

import java.awt.event.*;

import javax.swing.*;

publicclass EmailFrameextends JFrame

{

private InfoPanel infoPanel =new InfoPanel();

public EmailFrame()

{

super("Shared Listener Test");

setJMenuBar(createMenuBar());

getContentPane().add(infoPanel);

setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

setSize(190,150);

setLocation(300,300);

}

private JMenuBar createMenuBar()

{

JMenuBar menuBar =new JMenuBar();

JMenu menu;

JMenuItem item;

item =new JMenuItem("Exit");

item.addActionListener(new ActionListener()

{

publicvoid actionPerformed(ActionEvent evt)

{

System.exit(0);

}

});

return menuBar;

}

publicstaticvoid main(String[] args)

{

JFrame f =new EmailFrame();

f.setVisible(true);

}

}

class InfoPanelextends JPanel

{

private JTextField firstname =new JTextField(10);

private JTextField lastname =new JTextField(10);

private JTextField email =new JTextField(15);

private JButton button =new JButton("Submit");

public InfoPanel()

{

button.addActionListener(new ActionListener()

{

publicvoid actionPerformed(ActionEvent evt)

{

submit();

}

});

setLayout(new GridLayout(4,2));

add(new JLabel("Firstname"));

add(firstname);

add(new JLabel("Lastname"));

add(lastname);

add(new JLabel("Email"));

add(email);

add(button);

}

publicvoid clear()

{

firstname.setText("");

lastname.setText("");

email.setText("");

}

}

[4242 byte] By [benzspidaa] at [2007-10-3 1:09:37]
# 1
> error (Can not find symbol symbol method submit)simply, you dont have any declared submit() method.
mipsmea at 2007-7-14 18:06:31 > top of Java-index,Other Topics,Patterns & OO Design...
# 2
thanks for your help
benzspidaa at 2007-7-14 18:06:31 > top of Java-index,Other Topics,Patterns & OO Design...