Skip to main content

Help on Text Fields

1 reply [Last post]
Anonymous

Hi all,
I'm relatively new to Java Help. I've tried to launch the Help from a text
field using F1 key, but nothing happens. If I choose "Help" from my user
defined menubar, then it works. I did the following:

JTextField myTF = new JTextField();
CSH.setHelpIDString(myTF, "tf_help_anchor");

This code is in an extra dialog. In my main Panel I did this:

ClassLoader cl = this.getClass().getClassLoader();
try {
hs = new HelpSet(null, HelpSet.findHelpSet(cl, "RMTool.hs"));
} catch (Exception ee) {
System.out.println("HelpSet " + ee.getMessage());
System.out.println("HelpSet \"RMTool.hs\" not found");
}
hb = hs.createHelpBroker();
frame = new JFrame();
hb.enableHelpKey(frame.getRootPane(), "top", hs);

I thought if I use hb.enableHelpKey then the F1 key is activated through
my whole application, isn't it? Or have I to enable this key for each dialog
separately?

TIA,
Ralf.

__________________________________________________________________
Turbospeed zum Turbopreis! Surfen Sie doch auch mit der DSL-Flatrate
von Tiscali. Nur 15,90 EUR im Monat.
Tiscali DSL basiert auf dem T-DSL-Anschluss der Deutschen Telekom AG,
durch den weitere Kosten entstehen. Dieser ist in vielen
Anschlussgebieten verf?gbar. 6 Monate Mindestvertragslaufzeit.
Und falls Sie wider Erwarten im ersten Monat nicht zufrieden sein sollten,
gew

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Roger Brinkley

Ralf Heydenreich wrote:

> I thought if I use hb.enableHelpKey then the F1 key is activated through
> my whole application, isn't it? Or have I to enable this key for each dialog
> separately?

Yep on separately. Nasty but true.

Binky

********************************************************************************

You may leave the list at any time by sending message with no subject and
"SIGNOFF JAVAHELP-INTEREST" in the body to LISTSERV@JAVA.SUN.COM. Archives
are available at http://archives.java.sun.com/archives/javahelp-interest.html.
Submit bug reports at http://java.sun.com/cgi-bin/bugreport.cgi.