I thought as you. But the following code disprove it:
public class MyJavaHelp extends JDialog
{
private HelpBroker helpBroker;
public MyJavaHelp()
{
setModal(true);
setDefaultCloseOperation(EXIT_ON_CLOSE);
JMenu jm = new JMenu("Help");
JMenuItem jmi = new JMenuItem("Aplication Help");
jmi.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
{
helpBroker.showID("top", "javax.help.SecondaryWindow", "main window");
}
});
jm.add(jmi);
JMenuBar jmb = new JMenuBar();
jmb.add(jm);
setJMenuBar(jmb);
getContentPane().add(new JLabel("AAA"));
initHelp();
setSize(200, 200);
show();
}
private void initHelp()
{
String hs = "de/tsystems/cma/help/cma_help.hs";
ClassLoader cl = MainTO.class.getClassLoader();
HelpSet helpSet = null;
URL url = null;
try
{
url = HelpSet.findHelpSet(cl, hs);
helpSet = new HelpSet(null, url);
helpBroker = helpSet.createHelpBroker();
helpBroker.enableHelpKey(
getRootPane(),
"top",
helpSet,
"javax.help.SecondaryWindow",
"main window");
((DefaultHelpBroker) helpBroker).setActivationWindow(this);
}
catch (Exception e)
{
JOptionPane.showMessageDialog(this, "Error!!!");
}
}
public static void main(String[] args)
{
new MyJavaHelp();
}
If you run that code with your own java help set, you will see that the help window is not modal.