/** * Creates an icon from an image contained in the "images" directory. * * @param filename * @return the ImageIcon created */ public static ImageIcon createImageIcon(String filename) { ImageIcon icon = null; URL imgURL = getImageURL(filename); if (imgURL != null) { icon = new ImageIcon(imgURL); } return icon; }
/** * Creates an icon from an image contained in the "images" directory. * * @param filename * @return the ImageIcon created */ public static ImageIcon createImageIcon(String filename) { ImageIcon icon = null; URL imgURL = getImageURL(filename); if (imgURL != null) { icon = new ImageIcon(imgURL); } return icon; }
/** * Creates an image from an image contained in the "images" directory. * * @param filename * @return the Image created */ public static Image createImage(String filename) { Image icon = null; URL imgURL = getImageURL(filename); if (imgURL != null) { icon = Toolkit.getDefaultToolkit().getImage(imgURL); } return icon; }
/** * Creates an image from an image contained in the "images" directory. * * @param filename * @return the Image created */ public static Image createImage(String filename) { Image icon = null; URL imgURL = getImageURL(filename); if (imgURL != null) { icon = Toolkit.getDefaultToolkit().getImage(imgURL); } return icon; }
buttonPanel.setBorder(BorderFactory.createEtchedBorder()); String imgLogoTag="";//"<img src=\""+SwingUtil.getImageURL("airavata-2.png").toString()+"\" class=\".centeredImage\" /><br>"; String imgHeadingTag="<div style=\"width:100%;margin-right:10px;margin-left:10px;margin-top:5px;\" ><img src=\""+SwingUtil.getImageURL("airavata-title-text.png").toString()+"\" class=\".centeredImage\" /></div><br>"; String projectNameText = "";//"<h1>" + XBayaConstants.PROJECT_NAME + "</h1>"; String message = "<html>"+ styles +"<body align=\"center\">" + "<div style=\"background-color:white;width:100%;margin-bottom:0px;\">"+projectNameText + imgHeadingTag+ imgLogoTag +"</div><br><h2>" +XBayaConstants.APPLICATION_NAME + "</h2>" + "Version: "