public class FrameUpdate implements ActionListener{
JFrame frame;
JButton one;
JButton two;
public FrameUpdate(){
frame = new JFrame();
one = new JButton("下一个");
one.addActionListener(this);
two = new JButton("上一个");
two.addActionListener(this);
frame.add(one);
frame.pack();
frame.setVisible(true);
}