package org.rancode.framework.util; /** * * 说明:自定义带有背景图片的面板工具类 * * @author LS * * */ import java.awt.Graphics; import java.awt.Image; import java.awt.Toolkit; import javax.swing.JPanel; public class ImagePanel extends JPanel { // 创建图像变量 Image im; // 构造函数 public ImagePanel(Image im) { this.im = im;// 初始化图像变量 // 获取当前屏幕宽高 int width = Toolkit.getDefaultToolkit().getScreenSize().width; int height = Toolkit.getDefaultToolkit().getScreenSize().height; this.setSize(width, height); } // 绘制组件 public void paintComponent(Graphics g) { // 继承父类方法 super.paintComponent(g); g.drawImage(im, 0, 0, this.getWidth(), this.getHeight(), this); } }

DoustrongWU LV5
2月12日
alive13gyp LV2
1月22日
Zyy19820821 LV2
2024年9月24日
ma406805131 LV19
2024年6月25日
1542457015 LV3
2023年11月15日
zcfhh1 LV2
2023年10月3日
微信网友_6608533750566912 LV2
2023年8月16日
Assoc洛晓 LV2
2023年7月24日
2385649653 LV7
2023年6月17日
buhuia LV4
2023年6月9日

519506215 LV1
4月16日
wwb521 LV7
4月10日
DoustrongWU LV5
2月12日
alive13gyp LV2
1月22日
lz88888 LV12
2024年10月17日
Zyy19820821 LV2
2024年9月16日
luoyanglin LV2
2024年9月14日
微信网友_7030143019094016 LV1
2024年9月11日
liulian666 LV2
2024年7月19日
大明代码时代 LV7
2024年7月1日