How Can I Hook Up JavaHelp to Property Sets or Individual Properties?

Generally speaking, you can implement HelpCtx.Provider for objects in your platform application to associate them with a JavaHelp context (page). For some reason, this approach does not work with node properties. You can set the "helpID" value to associate JavaHelp with an individual property or an entire set, as shown below:

For Individual Properties

// in the constructor of your property class
public LastNameProperty(String initialValue) {
    super("lastName", String.class, "Last Name", "The user's surname");

    // This is how you associate a given property with a help context.
    setValue("helpID", "");

For a Set of Properties

protected Sheet createSheet() {
    Sheet s = super.createSheet();

    Sheet.Set ss = s.get(Sheet.PROPERTIES);
    if (ss == null) {
        ss = Sheet.createPropertiesSet();

    // Do this to specify help for a whole sheet set
    ss.setValue("helpID", "");

    ss.put(new FirstNameProperty("Abe"));
    ss.put(new LastNameProperty("Lincoln"));

    return s;
Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo