Hi,
On Fri, 22 Jul 2005, Jeff Brandenburg wrote:
> As a workaround, I've made a subclass of GenericDialog, adding the
> following method:
>
> public void makePasswordField() {
> if (stringField.size() > 0) {
> TextField tf = (TextField)
> this.stringField.elementAt(this.stringField.size()-1);
> tf.setEchoChar('*');
> }
> }
How about something like this instead:
public void addPasswordField(String label, String default) {
addStringField(label,default);
TextField tf = (TextField)stringField.elementAt(stringField.size()-1);
tf.setEchoChar('*');
}
BTW I would vote against changing GenericDialog: It is just not meant to
handle dialogs independent from image processing. Besides, I don't think
it is a kludge to extend GenericDialog to your needs by inheriting it.
Ciao,
Dscho