JavaHelp modal window

Hello everybody. Can anybody tell me Is it possible to make a help window modal (like JDialog)?Thank you.
[126 byte] By [bulba_aa] at [2007-10-3 1:20:18]
# 1
I think the Help Frame's modality is dependant upon the modality of the window/dialog from which it is launched.i.e. if the window containing the button/menu from which help is launched is modal, the Help Frame will be modal and visa versa
technodeitya at 2007-7-14 18:17:29 > top of Java-index,Desktop,Developing for the Desktop...
# 2

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.

bulba_aaaa at 2007-7-14 18:17:29 > top of Java-index,Desktop,Developing for the Desktop...
# 3
use modal dialog :((DefaultHelpBroker)helpbroker).setActivationWindow(modal_dialog); your javahelp will be modal like dialog
DZaKa at 2007-7-14 18:17:29 > top of Java-index,Desktop,Developing for the Desktop...