This discussion is archived
0 Replies Latest reply: Mar 3, 2010 9:34 AM by 843810 RSS

how to display help based on the Jlabel description

843810 Newbie
Currently Being Moderated
Hi all,
I try to display help based on the Jlabel description. When a user click on the help button, I want to use the label description to match correct help topic and display on the screen. I have following code as Field-level help but it returns error. Looks like I cannot use jLabel1.gettext() dynamically. Please let me know if you have any idea!
            String st = jLabel1.getText();
            URL url = HelpSet.findHelpSet(null,"preferences.hs");
          hs = new HelpSet(null,url);
           hb = hs.createHelpBroker();                       
           hb.enableHelp( jLabel1, jLabel1.gettext(), hs );
Thanks,
NY