简单问题——applet中用相对路径设置JButton的Icon问题,在线给分
用jbuilder8.0 做了一个project 在里面添加几个jButton
bgfile = new File("recources//00.gif") ;
用jButton1.setIcon(new Image(new java.net.URL("file:"+bgfile.getAbsolutePath())),来设置button的背景,
为什么显示不出来?
而用绝对路径就没问题,但这样的可移植性就差了
望各位仁兄帮忙!!