Professional Documents
Culture Documents
WWW.KVRSOFTWARES.BLOGSPOT.COM
System.out.println(e);
}
}
}
};
thread.start();
}
public void paintComponent(Graphics g)
{
super.paintComponent(g);
g.setColor(Color.BLUE);
g.fillOval((int)(X-r), (int)(Y-r), (int)d, (int)d);
}
public static void main(String[] args)
{
JFrame jf = new JFrame("bouncing ball");
jf.setSize(300, 200);
jf.setContentPane(new bouncingball());
jf.setVisible(true);
}
}
OUT-PUT:
WWW.KVRSOFTWARES.BLOGSPOT.COM
WWW.KVRSOFTWARES.BLOGSPOT.COM