How do I add a readonly property?

You can customize your properties by using the setValue method.


PropertySupport.ReadOnly<String> javaVersionProperty = new PropertySupport.ReadOnly<String>(RuntimeProxyBean.PROP_VMVERSION, String.class, "JVM version", "Java VM version") {

            public String getValue() throws IllegalAccessException, InvocationTargetException {
                return runtimeProxyBean.getVmVersion();

javaVersionProperty.setValue("suppressCustomEditor", true);

Taken from mailing list, contributed by Jean-Marc Borer

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