Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem w/ JApplet and Graphics class

Status
Not open for further replies.

natwod

Programmer
Nov 21, 2002
41
US
Hi, I am having some problems with a JApplet I'm making. I ran into this problem before, but I think I got around it by using Applet instead of JApplet, but that didn't work for this one. When I compile, I get the error "Cannot resolve symbol: class Graphics..."

Here is part of my code.


import java.awt.event.*;
import javax.swing.*;

public class MyApplet extends JApplet implements ActionListener, MouseListener, MouseMotionListener
{
public void paint(Graphics page)
{
if (!closed) {
page.drawPolyline();
}
else {
page.fillPolygon();
}
}


 
Ok, I figured it out. Stupid mistake. I just needed to import java.awt.*;

Thanks anyhow,
Natwod

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top