import java.awt.*;
import javax.swing.*;
import java.awt.event.*; //***
public class JCombo extends JApplet
implements ActionListener {
JComboBox myCombo;
JPanel mypan;
JTextArea myBox;
JButton myRound;
String myOrder=" " ;
public void init() {
mypan = new JPanel();
myBox = new JTextArea (5,15);
myCombo = new JComboBox();
myCombo.addItem ("Larger"
;
myCombo.addItem ("Beer"
;
myCombo.addItem ("Red Wine"
;
myCombo.addItem ("White Wine"
;
myCombo.addItem ("Orange juce"
;
myCombo.addItem ("lemonade"
;
mypan.add(myCombo);
myRound = new JButton ("My order>>>>"
;
myRound.addActionListener (this);
mypan.add(myRound);
mypan.add (myBox);
setContentPane(mypan);
}
public void actionPerformed (ActionEvent e) { //***
myOrder += myCombo.getSelectedItem()+"\n";
myBox.setText(myOrder);
}
}
//You have typing errors in ***
import javax.swing.*;
import java.awt.event.*; //***
public class JCombo extends JApplet
implements ActionListener {
JComboBox myCombo;
JPanel mypan;
JTextArea myBox;
JButton myRound;
String myOrder=" " ;
public void init() {
mypan = new JPanel();
myBox = new JTextArea (5,15);
myCombo = new JComboBox();
myCombo.addItem ("Larger"
myCombo.addItem ("Beer"
myCombo.addItem ("Red Wine"
myCombo.addItem ("White Wine"
myCombo.addItem ("Orange juce"
myCombo.addItem ("lemonade"
mypan.add(myCombo);
myRound = new JButton ("My order>>>>"
myRound.addActionListener (this);
mypan.add(myRound);
mypan.add (myBox);
setContentPane(mypan);
}
public void actionPerformed (ActionEvent e) { //***
myOrder += myCombo.getSelectedItem()+"\n";
myBox.setText(myOrder);
}
}
//You have typing errors in ***