メソッド名ペイントを持つsagumという名前のクラスがあります
public void paint(Graphics g) {
int[] apw1 = null;
int n1 = 0;
for (int j = 1; j <= n1; j++) {
g.drawRect(50, 50, (apw1[j] * 20), 30);
String[] p = null;
g.drawString("p" + p[j - 1], (55 + (apw1[j - 1] * 20)), 70);
g.drawString("" + apw1[j - 1], 50 + (apw1[j - 1] * 20), 100);
}
g.drawString("" + apw1[n1], 50 + (apw1[n1] * 20), 100);
}
私はそれを呼び出そうとしている
n1=count+1;
paint(g);
エラーが発生します
non-static method paint(Graphics) cannot be referenced from a static context
メソッドが実行された後に呼び出して、メソッドのグラフィカルアプリ(スケジューリングアルゴリズム)を実行しようとしています。
助けてください