|
Answer» 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.
Code: [Select]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); } } Would you mind telling us the errors..
Where are all your other classes?never mind i found out what i did wrong
|