userinterface
Class MessageUpdater
java.lang.Object
userinterface.MessageUpdater
- All Implemented Interfaces:
- java.lang.Runnable
class MessageUpdater
- extends java.lang.Object
- implements java.lang.Runnable
This internal class is meant to run as an independent thread to update messages to the user.
While the program is running, this thread will often check for new messages to post.
- Author:
- Håvard Rykkelid
Constructor Summary |
MessageUpdater(javax.swing.JTextField textField,
javax.swing.JButton button)
The constructor |
Method Summary |
void |
run()
This method will be run when the Thread containing this class-description is started |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
textField
javax.swing.JTextField textField
button
javax.swing.JButton button
messages
java.util.Vector<DataPackage> messages
MessageUpdater
MessageUpdater(javax.swing.JTextField textField,
javax.swing.JButton button)
- The constructor
- Parameters:
textField
- - a reference to the text-field where messages should be postedbutton
- - a reference to the button that should change text between "start" and "stop"
run
public void run()
- This method will be run when the Thread containing this class-description is started
- Specified by:
run
in interface java.lang.Runnable