jQuery in Action, 2nd edition*
The moose likes Beginning Java and the fly likes HELP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "HELP" Watch "HELP" New topic
Author

HELP

Jose Carrillo
Greenhorn

Joined: Nov 13, 2003
Posts: 17
Hello I'm creating an applet; however, I can compile because I'getting the folloging errors

Ex2_1a.java:8: cannot resolve symbol
symbol : class Spiral
location: class Ex2_1a
Spiral spral;
^
Ex2_1a.java:13: cannot resolve symbol
symbol : class Spiral
location: class Ex2_1a
spral = new Spiral();
^
this my code if somebody can help I really apreciated, please tell me what is my mistake and ho can I fix it. thanks.
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.*;
public class Ex2_1a extends JApplet implements ActionListener
{
Spiral spral;
public void init()
{
JButton jbutton = new JButton("graw spiral");
spral = new Spiral();
spral.setBackground(new Color(0xffffcc));
Container container = getContentPane();
JPanel jpanel = new JPanel();
jpanel.setLayout(new FlowLayout());
jpanel.add(jbutton);
container.setLayout(new BorderLayout());
container.add(jpanel, "North");
container.add(spral, "Center");
jbutton.addActionListener(this);
}
public void actionPerformed(ActionEvent actionevent)
{
String s = JOptionPane.showInputDialog("Enter the winding number");
spral.W = Integer.parseInt(s);
spral.repaint();
}

}
Thomas Paul
mister krabs
Ranch Hand

Joined: May 05, 2000
Posts: 13974
The "JavaRanch" forum is to discuss things about this site such as "how do I make my code maintain a nice format when I enter into the forum"? It is not to discuss problems with your code. That is why we have the 35 other forums. I am moving this to "Java in General(Beginners)".


Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
 
Don't get me started about those stupid light bulbs.
 
subject: HELP