public void paint(Graphics g) {
        int size = this.getHeight();

        int width = size / drawingSize;
        int height = size / drawingSize;
        for (int x = 0; x < drawingSize; x++) {
            for (int y = 0; y < drawingSize; y++) {
                // draw color
                if (drawing[x][y] == 0) {
                    g.setColor(Color.BLACK);
                }
                if (drawing[x][y] == 1) {
                    g.setColor(Color.WHITE);
                }

                g.fillRect(x * width, y * height, width, height);
                // draw grid
                g.setColor(Color.GRAY);
                g.drawRect(x * width, y * height, width, height);
            }
        }
    }