First off there is no need for the sarcasm and rudeness against the new member.
@kenny1591: Please read through the rules here at Programming forums
http://www.programmingforums.org/for...q=faq_policies
If you look up at your code you posted (I have added the [highlight] tag to your code to preserve the formatting. If you look at it your closing brackets are not in the right places. You are not closing paintComponent. You have enough } but you have 2 of them at the very bottom and you need another one before main. If you look at the code you should see that. You will also need to remove one of the extra ones. Something like this.
import java.awt.Graphics;
import java.awt.Color;
import java.awt.Image;
import java.awt.Container;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.ImageIcon;
public class WalkerTest extends JPanel
{
private Image leftShoe;
private Image rightShoe;
// Constructor
public WalkerTest()
{
leftShoe = (new ImageIcon("leftShoe.gif")).getImage();
rightShoe = (new ImageIcon("rightShoe.gif")).getImage();
}
// Called automatically when the panel needs repainting
public void paintComponent(Graphics g)
{
super.paintComponent(g);
int x = 300;
int y = 100;
int stepLength = 100;
Walker walker = new Walker(x, y, leftShoe, rightShoe);
for (int count = 1; count <= 8; count++)
{
walker.draw(g);
walker.nextStep();
// Draw a cursor at the expected center of the first "shoe"
g.drawLine(x - 50, y, x + 50, y);
g.drawLine(x, y - 50, x, y + 50);
}
} // <= Look here and again at the very bottom
public static void main(String[] args)
{
JFrame window = new JFrame("Walker");
window.setBounds(100, 100, 500, 480);
window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
WalkerTest panel = new WalkerTest();
panel.setBackground(Color.WHITE);
Container c = window.getContentPane();
c.add(panel);
window.setVisible(true);
}
}