• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HELP

 
Jose Carrillo
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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)".
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic