Ps2RealityControlCenter(String dir) throws IOException { try { byte[] abIcon; InputStream inputstreamIcon = this.getClass().getResourceAsStream("icon.gif"); int iIconSize = inputstreamIcon.available(); abIcon = new byte[iIconSize]; inputstreamIcon.read(abIcon); this.setIconImage(new ImageIcon(abIcon).getImage()); } catch (Exception ex) { // the default icon will be used } panelChooser = new Ps2RealityFileChooser(dir); }