public AboutDialog(JFrame frame, URL aboutURL, String title) { super(frame); getContentPane().setLayout(new BorderLayout()); try { text = Utilities.toString(aboutURL, Charset.forName("utf-8")); } catch (IOException e) { throw new IllegalArgumentException("cannot read about text from " + aboutURL); } text = Utilities.unixEncode(text); showPanel(); setModal(true); setTitle(title); pack(); UIUtilities.centerWindow(this); }