List of utility methods to do JDialog Icon
void | jdialog$setIconImage(JDialog dlg, Image image) jdialoset Icon Image try { Method e = dlg.getClass().getMethod("setIconImage", new Class[] { Image.class }); e.invoke(dlg, new Object[] { image }); } catch (Exception var3) { var3.printStackTrace(); |
void | setDialogIcon(JDialog dialog, InputStream imageInputStream) Set the icon if a dialog. try { dialog.setIconImage(ImageIO.read(imageInputStream)); } catch (IOException | NullPointerException e) { System.out.println("Failed to set window icon."); |
void | setDialogIcon(JDialog dlg) Set the Icon for an dialog try { Image image = ImageIO.read(dlg.getClass().getResourceAsStream("icon.png")); Class cls = Dialog.class; java.lang.reflect.Method m = cls.getMethod("setIconImage", new Class[] { Image.class }); m.invoke(dlg, new Object[] { image }); } catch (Throwable e1) { |
void | setIconImage(JDialog j, Image b) A hack into the JDK 6.0 Window class, written for backwards compatibility Shows an icon in the top corner of Dialog windows try { Class.forName("java.awt.Window").getDeclaredMethod("setIconImage", new Class[] { java.awt.Image.class }) .invoke(j, b); } catch (Exception e) { |
void | setWindowIcon(JDialog jd) set Window Icon ImageIcon frameIcon = getDefaultFrameIcon();
if (frameIcon != null)
jd.setIconImage(frameIcon.getImage());
|