私我源码
主函数调用入口MainPro
//主函数调用窗口public class MainPro {public static void main(String[] args) {MyFrame myFrame = new MyFrame();}}
创建图片JImage
import javax.swing.*;import java.util.Random;//创建图片public class JImage extends JPanel {public ImageIcon computerSrc;public ImageIcon playerSrc;public JLabel jLabel1;public JLabel jLabel2;public JImage(){jLabel1 = new JLabel();jLabel2 = new JLabel();computerSrc = new ImageIcon("./images/剪刀.png");playerSrc = new ImageIcon("./images/剪刀.png");jLabel1.setIcon(computerSrc);jLabel2.setIcon(playerSrc);add(jLabel1);add