06/11/21 17:26:03
>>160
Graphics2D g2 = (Graphics2D)g;
g2.clearRect(0, 0, this.getSize().width, this.getSize().height); //画面を一度クリア
AffineTransform backup = g2.getTransform(); // backup
g2.translate(100, 0);
g2.draw(new Line2D.Float(10,50,20,50)); //x軸を描画
g2.setTransform(backup); // restore