i am using eclipse to make my java program and it is showing me some errors. i try to fix them but it still shows errors.
package window;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class testModems extends JFrame {
// makes buttons
JButton cablebutton = new JButton("Cable");
cablebutton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
CableModem roadRunner = new CableModem();
roadRunner.speed = 4000;
System.out.println("Trying the cable modem");
roadRunner.displaySpeed();
roadRunner.connect();
}
});
JButton DSLbutton = new JButton("DSL");
DSLbutton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
DSLModem bellSouth = new DSLModem();
System.out.println("Trying the DSL modem");
bellSouth.displaySpeed();
bellSouth.connect();
}
});
JButton Wireless = new JButton("Wireless");
Wireless.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
wireless waves = new wireless();
System.out.println("Trying to connect to wireless connection");
waves.displaySpeed();
waves.connect();
}
});
public testModems() {
super("Modems");
setSize(100, 200);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
FlowLayout lay = new FlowLayout();
setLayout(lay);
add(cablebutton);
add(DSLbutton);
add(Wireless);
setVisible(true);
}
}