不啰嗦,直接上代码啦!
package gyb;
import java.awt.BorderLayout;
import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
// import java.awt.event.MouseMotionListener;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
import javax.swing.Icon;
import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;
import javax.swing.JPanel;
public class Picture extends JFrame{
JMenuItem shuffle;
JMenuItem sort;
private int sm;
private final int NUM=9;
public Picture() {
init();
}
JPanel pane;
JLabel label;
private void init() {
setSize(458,515);
JMenuBar bar=bar();
setJMenuBar(bar);
label=new JLabel("Number:"&#