Link to home
Start Free TrialLog in
Avatar of duta
duta

asked on

Error Message: Cannot find symbol class ActionListner

Dear experts:

Hi again!

I got an error message as (in the title), while compiling a simple Java code.  Part of the code aret are as the follows:

import javax.swing.JOptionPane;
import java.text.DecimalFormat;
import java.util.regex.*;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;

public class CalcRate extends JApplet implements ActionListner
  {
   
   JLabel die1Label, die2Label, sumLabel, pointLabel;
   JTextField die1Field, die2Field, sumField, pointField;
   JButton rollButton;

.
.
.
.

 public void init ()
  {
     Container tiger = getContentPane ();
     tiger.setLayout ( new FlowLayout ()  );
     
     
     die1Label = new JLabel( "Die 1");
     tiger.add (die1Label);
     
     die1Field = new JTextField (10);
     die1Field.setEditable (false);
     tiger.add (die1Field);
     
     die1Label = new JLabel ( "Die 2");
     tiger.add (die1Label);
     
     die2Field = new JTextField (10);
     die2Field.setEditable (false);
     tiger.add (die2Field);
     
     sumLabel = new JLabel ( "Sum is ");
     tiger.add (sumLabel);
     
     sumField = new JTextField (10);
     sumField.setEditable  (false);
     tiger.add (sumField);
     
     pointLabel = new JLabel ( "Point is ");
     tiger.add (pointLabel);
     
     pointField = new JTextField (10);
     pointField.setEditable  (false);
     tiger.add (pointField);
     
     rollButton = new JButton ("Roll Dice");
     rollButton.addActionListner (this);
     tiger.add (rollButton);
     
   
   
  }
ASKER CERTIFIED SOLUTION
Avatar of matthew016
matthew016
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
>> rollButton.addActionListner (this);

rollButton.addActionListener (this);
Avatar of duta
duta

ASKER

Matthew, thanks a lot.

I will take time to try your tip, and come back to you.

Thanks a lot!