📜  将 jpg 添加到 JPanel - Java 代码示例

📅  最后修改于: 2022-03-11 14:52:35.349000             🧑  作者: Mango

代码示例1
BufferedImage myPicture = ImageIO.read(new File("path-to-file"));
JLabel picLabel = new JLabel(new ImageIcon(myPicture));
add(picLabel);