したがって、ユーザーが私のJButtonを押すと、ランダムな時間が選択され、その後、画面に楕円形が描画されます。しかし、今持っているものでは、ボタンを押した直後に楕円形になります。ランダムな時間の後に表示したい。
public void actionPerformed(ActionEvent e)
{
if (e.getSource() == startButton)
{
popUpTime = random.nextInt(5000);
timer = new Timer(popUpTime, this);
x = random.nextInt(400) + 70;
y = random.nextInt(400) + 100;
points[current++] = new Point(x, y);
timer.start();
start();
repaint();
}
}