Hi,
I am a student now working on a Java project. I encountered a problem in event handling, and could you please kindly help me to have a look?
The code is as follows:
import javax.swing.*;
import java.awt.*;
import javax.swing.border.*;
import java.awt.event.*;
import javax.swing.event.*;
public class bug1 {
public static void main(String[] args) {
JFrame aWindow = new JFrame(“Mr. Travel Co. “);
Toolkit theKit = aWindow.getToolkit();
Dimension wndSize = theKit.getScreenSize();
aWindow.setBounds(20, 20, wndSize.width-100, wndSize.height-40);
aWindow.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
aWindow.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
aWindow.setVisible(true);
bug.core();
}
}
class bug extends JFrame implements ActionListener {
public static JFrame aWindow = new JFrame(“Mr. Travel Co. “);
public static JTextField fromPlaceText;
public static JButton submit;
public