I am writing a program, which represents a clock, and also has a textfield, which I instantiate with :
JTextField tfield = new JTextField();
So, I want the user to fill the textfield with a String like 12 34 56
(which should set off the alarm of the clock at that given time).
My main method executes the following:
public static void main(String[] args) {
createAndShowGui();
}
...where createAndShowGui()
creates Panel
and Frame
(plus Textfield
and Buttons
) and calls the other function which I use to display the current time.