i trying assign favicon jdialog. code works, image ends hardcoded.
imageicon favimageicon = new imageicon("../images/default.gif"); image faviconimage= favimageicon.getimage(); dialog.seticonimage(faviconimage); parent frame has favicon. how can set jdialog use favicon of it's parent? tried dialog.seticonimage(super); incorrect.
you can use image file resources in jar file.
url url =getclass().getresource("/media/something.png"); imageicon imageicon = new imageicon(url); and wont hard coded!
Comments
Post a Comment