Java JLabel SetIcon update change the JLabel Zorder -
i have 2 jlabels need put 1 on second. first time page loaded correctly. made button changing icon (jfilechooser) once validated changes zorder come in front :
file newi = new file(user.getprofilepic()); bufferedimage newibuff; try { newibuff = imageio.read(newi); bufferedimage newim = resizeimage(newibuff, labelpic.getwidth(), labelpic.getheight()); labelpic.seticon(new imageicon(newim)); labelpic.setcomponentzorder(labelpic, 1); } catch (ioexception e1) { // todo auto-generated catch block e1.printstacktrace(); }
Comments
Post a Comment