whats wrong with this code?

package MineFront;

import MineFront.DataTypes.World;

import javax.swing.*;
import java.awt.image.BufferedImage;
import java.awt.image.DataBufferInt;

//TIP To <b>Run</b> code, press <shortcut actionId="Run"/> or
// click the <icon src="AllIcons.Actions.Execute"/> icon in the gutter.
public class Window extends JPanel {
static World world = new World();
static JFrame window = new JFrame("MineFront-PreAlpha-0.1");
static BufferedImage img = new BufferedImage(800,600, BufferedImage.TYPE_INT_ARGB);
private static int[] pixels = ((DataBufferInt)img.getRaster().getDataBuffer()).getData();



public static void drawPixel(int index,int color){
pixels[index] = color;
}
public static void main(String[] args) {
window.setSize(800,600);
window.setLocationRelativeTo(null);
window.setResizable(true);
window.setVisible(true);
window.add(new Window());
drawPixel(12,0xFF02EAFA);
}
}
Was this page helpful?