This is my code I will highlight the error please help thanks
-------------------------------------------------------------------
package minecrafttwod;
import java.applet.*;
import javax.swing.*;
import java.awt.*;
public class Component extends Applet implements Runnable{
private final long serialVersionUID = 1l;
private static int pixelsize = 2;
public static Dimension size = new Dimension(700, 550);
public static Dimension pixel = new Dimension(size.width / pixelsize, size.height / pixelsize);
public static String name = "DigBlocks";
public static boolean isRunning = false;
private Image screen;
public Component(int width, int height){
}
public Component(){
setPreferredSize(size);
}
public void start(){
//Defining objects etc
//Starting game loop
isRunning = true;
new Thread(this).start();
}
public void stop(){
isRunning = false;
}
public static void main(String args[]){
Component component = new Component();
JFrame frame = new JFrame();
frame.add(component);
frame.pack();
frame.setTitle(name);
frame.setResizable(false);
frame.setLocationRelativeTo(null);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOS E);
frame.setVisible(true);
component.start();
}
public void tick(){
}
public void render(){
Graphics g = screen.getGraphics();
//Drawing things
g.setColor(new Color(255, 100, 100));
g.fillRect(0. 0, 100, 100);
}
public void run() {
screen = createVolatileImage(pixel.width, pixel.height);
while(isRunning){
tick();
render();
try{
Thread.sleep(5);
}catch(Exception e) {}
}
}
}