Package Controller
Class ClearListener
java.lang.Object
Controller.ClearListener
- All Implemented Interfaces:
java.awt.event.ActionListener,java.util.EventListener
public class ClearListener
extends java.lang.Object
implements java.awt.event.ActionListener
This Class is a listener that checks if the clear button is pressed.
If it is pressed the output text field is cleared of all information
it contains.
-
Constructor Summary
Constructors Constructor Description ClearListener(javax.swing.JTextArea outputText1)The constructor of the Class which takes JTextArea and builds a listener out of it. -
Method Summary
Modifier and Type Method Description voidactionPerformed(java.awt.event.ActionEvent actionEvent)A method which controls the action to be performed for the button pressed.
-
Constructor Details
-
ClearListener
public ClearListener(javax.swing.JTextArea outputText1)The constructor of the Class which takes JTextArea and builds a listener out of it.- Parameters:
outputText1- the textArea to be processed.
-
-
Method Details
-
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent actionEvent)A method which controls the action to be performed for the button pressed. In this case it clears the field.- Specified by:
actionPerformedin interfacejava.awt.event.ActionListener- Parameters:
actionEvent- the event monitored.
-