June 2017
Beginner
1296 pages
69h 23m
English
... text field. The width of the field is determined by the width of the default text. When you execute the application, notice that the text is displayed as a string of asterisks. Line 39 adds passwordField to the JFrame
This example should display a message dialog containing the text from a text field when the user presses Enter in that text field. Before an application can respond to an event for a particular GUI component, you must:
Create a class that represents the event handler and implements an appropriate interface—known as an event-listener interface.
Indicate that an object of the class from Step 1 should be notified when the event occurs—known as registering the event handler ...
Read now
Unlock full access