private javax.swing.JToggleButton jToggleButton1;
// 変数宣言の終わり
public void run() {
}
double x, y, vx, vy;
double a = 0.998;
Graphics2D g = null;
int w, h;
public void gInit() {
g = (Graphics2D)jPanel1.getGraphics();
Dimension s = jPanel1.getSize();
w = s.width - 10;
h = s.height - 10;
x = 100;
y = 50;
}
public void paint(Graphics g0) {
if(g == null) gInit();
super.paint(g0);
g.setColor(Color.blue);
g.fill(new Ellipse2D.Double(x,y,10,10));
jPanel1.setVisible(true);
}
}
|