贵州省人事考试信息,郑伟平,御龙在天跳舞
这里我就放上改写的代码吧,不做多的解释,推荐一个好的博文
1 public void ini_background() { 2 // 背景图片 3 imageicon background = new imageicon( 4 this.getclass().getresource("/img/登录背景.png")); 5 // 把背景图片显示在一个标签里面 6 jlabel label = new jlabel(background); 7 // 设置标签大小 8 label.setbounds(0, 0, 440, 335); 9 // 把内容窗格转化为jpanel,否则不能用方法setopaque()来使内容窗格透明 10 jpanel imagepanel = (jpanel) this.getcontentpane(); 11 imagepanel.setopaque(false); 12 this.getlayeredpane().setlayout(null); 13 // 把背景图片添加到分层窗格的最底层作为背景 14 this.getlayeredpane().add(label, new integer(integer.min_value)); 15 }
如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复
浅析我对 String、StringBuilder、StringBuffer 的理解
使用IDEA搭建SSM框架的详细教程(spring + springMVC +MyBatis)
Springboot整合freemarker 404问题解决方案
引入mybatis-plus报 Invalid bound statement错误问题的解决方法
网友评论