在JFrame例如,下面的代码被添加 //自己的JPanel DrawPanel drawPanel = new DrawPanel(list, width, height, start, end); // 必需要有大小 drawPanel.setSize(width, height); BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB); Graphics2D g2 = image…