很复杂吗?import java.awt.*;
import java.awt.event.ActionEvent;
import javax.swing.*;public class Applet1 extends JApplet {
  private boolean isStandalone = false;
  JPanel jPanel1 = new JPanel();
  public JLabel jLabel1 = new JLabel();
  JButton jButton1 = new JButton();  //Initialize the applet
  public void init() {
    try {
      jbInit();
    }
    catch(Exception e) {
      e.printStackTrace();
    }
  }
  //Component initialization
  private void jbInit() throws Exception {
    this.getContentPane().setBackground(SystemColor.control);
    this.setEnabled(true);
    this.setForeground(Color.black);
    this.setSize(new Dimension(400,300));
    jPanel1.setLayout(null);
    jLabel1.setText("ttt");
    jLabel1.setBounds(new Rectangle(83, 41, 43, 18));
    jButton1.setText("jButton1");
    jButton1.addActionListener(new java.awt.event.ActionListener() {
      public void actionPerformed(ActionEvent e) {
        jButton1_actionPerformed(e);
      }
    });
    this.getContentPane().add(jPanel1, BorderLayout.CENTER);
    jPanel1.add(jLabel1, null);
    this.getContentPane().add(jButton1, BorderLayout.NORTH);
    this.jLabel1.setIcon(new ImageIcon(getClass().getResource("Pic.JPG")));
  }  void jButton1_actionPerformed(ActionEvent e) {
    new Thread() {
      public void run() {
        jLabel1.setBounds(0, jLabel1.getY(), jLabel1.getWidth(), jLabel1.getHeight());
        while(true)
        try{
          Thread.sleep(100);
          if(jLabel1.getX() <= jPanel1.getWidth() - jLabel1.getWidth())
            jLabel1.setBounds(jLabel1.getX() + 10, jLabel1.getY(), jLabel1.getWidth(), jLabel1.getHeight());
          else
            break;
        }catch(Exception ee){        }
      }
    }.start();
  }}