public final class SaveMsgField extends Observable implements Observer
Constructor and Description |
---|
SaveMsgField()
Creates a text field and adds a mouse listener, to display the directory chooser dialog when a user clicks on the field.
|
Modifier and Type | Method and Description |
---|---|
JTextField |
get()
Returns the JTextField object.
|
void |
update(Observable o,
Object arg)
Updates the content of the JTextField with the new directory value.
|
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
public SaveMsgField()
The text field will be disabled by default to avoid the user to type any folder directly.
Instead, he can use the directory chooser dialog to select the path he wants.
public JTextField get()
public void update(Observable o, Object arg)
Once a directory has been chosen by the DirChooser
, the latter will
notify this class, so that it can update its content.
Copyright © 2015. All rights reserved.