class Help extends JDialog {
Help(Frame frame, String title) {
super(frame, title);
setModalExclusionType(Dialog.ModalExclusionType.APPLICATION_EXCLUDE);
try {
JEditorPane ep = new JEditorPane("file:///" + new File("").getAbsolutePath() + "/uchelp.html");
ep.setEnabled(false);
getContentPane().add(ep);
} catch (IOException ioe) {
JOptionPane.showMessageDialog(frame, "Unable to install editor pane");
return;
}
setSize(200, 200);
setLocationRelativeTo(frame);
setVisible(true);
}
}
|