The intention is that when this method is called (perhaps by the user clicking a button) it will type out the letters of "Hello." in slow motion (i.e.
with a 500 ms pause between each new letter appearing).
(I have already tried sticking text Field.revalidate() in). paintimmediately takes up a lot of resources so don't do it too often.
For your code (500 sleep) it won't be a problem to paint every iteration but if you had a much smaller pause in the process, you would want to limit how often you paint.
The println shows messages scrolling in the text window, but I don't see them in the text field, just the last one, so I assume they are still all updating at once when the event queue empties.
I left my various failed attempts commented in the code.
public final class Log Handler I was hoping to use the area as a status of where things were at the moment.
I would like to know how to change the name of the textfield name, so that I can change the code to be more user friendly.also, make sure that what you type inside the JText Field is an int value (not double\String etc), or you'll get exceptions. move all declaration of variables that you may use in other methods out of the action Performed. If you want to use Components later, then you really should declare them before using them, as it is a pain to hunt through your Container to obtain them.Nine out of ten times, you will not have a Component if you do not plan on modifying its display.Basically the form loads and user picks a choice from the combo box. If the input is right /equals the real answer then score = score 1.This fires an event which connects to a database table and retrieves the first record. I attach key Listener to the JText Field grid, i ...(I'm a very novice programmer!
Search for updating jtextfield:
) All I'm trying to do is see seconds counting away in a JText Field.