importjavax.swing.*;importjava.awt.*;importjava.awt.event.*;publicclassfengshanextendsJFrame{publicfengshan(){add(newzhuandong());}publicstaticvoidmain(String[]args){feng...
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class fengshan extends JFrame{
public fengshan(){
add(new zhuandong());
}
public static void main(String[] args){
fengshan f=new fengshan();
f.setSize(400, 400);
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
f.setLocationRelativeTo(null);
f.setVisible(true);
}
class zhuandong extends JPanel{
public zhuandong(){
Timer timer=new Timer(1000,new TimerListener());
timer.start();
}
protected void paintComponent(Graphics g){
super.paintComponent(g);
int xcenter&#