小编use*_*445的帖子

创建PShape时,Processing的库中的NullPointerException

我有以下处理程序:

//using Papplet instead of STDraw to visually represent my grid, created by Mahmed Ibrahim
import java.awt.Color;

import processing.core.*;

import processing.core.PApplet;

public class C4Grid extends PApplet {
    PShape s;
    PShape[][] circleSpaces;
    boolean[][] circleSpacesFilled;
    boolean[][] circleHasYelowPiece;
    boolean[][] circleHasRedPiece;
    final float SPACES_BETWEEN_ROWS = 110;
    final float SPACES_BETWEEN_COLUMNS = 130;


    public C4Grid(){}

    public void setup() {
        System.out.println("it got to here where it breaks");

        size(1000, 1000, P2D);

        // Making the shape of the grid using vertices
        // so I'm manually drawing my polygon.
        s …
Run Code Online (Sandbox Code Playgroud)

java eclipse processing nullpointerexception

2
推荐指数
1
解决办法
167
查看次数

标签 统计

eclipse ×1

java ×1

nullpointerexception ×1

processing ×1