Want to add an input,but the input value selected from the other UI.
I searched the API DOC,did not find method to set input component read-only,It’s possible to set input component read only?
another question:
How to set dialog UI component align(left or right)?
Hi @lou,
You can add a read only compont as a label:
DialogComponentLabel label = new DialogComponentLabel("read only value");
// update the text
label.setText("new text");
However, this does not have a settings model, so you need to store the selected value somewhere else.
In your case it might be a good idea to use a list selection component like: DialogComponentStringSelection, it provides a dropdown list where a user selects an option.
In the DefaultNodeSettingsPane you can only chose horizontal or vertical dialog component placement, if you want to layout the dialog yourself you need to fall back to the NodeDialogPane, create a JPanel and customize its layout with e.g. a GridBagLayout.