java - Directly changing text displayed by JTextField -


I got a JTextField activated, which is like my program console whenever I see just one text So that the user will know what's going on.

This works fine when I try to edit some text directly. A perfect example is my check job method:

  public zero check job (int paus) {if (locked == false) {if (active [pos] == true) {textArea. SetText (undoJob (POS)); } Other {textArea.setText (setJob (pos)); }} Else {String oldText = textArea.getText (); TextArea.setText ("Slave Spill Top Bettes Batten."); TextArea.setText (countdown (oldtext)); }} Public string countdown (string older text) {long startTime = System.currentTimeMillis (); Length endtime = system syntetime millise (+5000; Long Current Time = System Syrtetime Milliseau (); While (current time & lt; end time) {if (current time> gt; = start time + 1000) {currentTime = System.currentTimeMillis (); StartTime = startTime + 1000; } And {currentTime = System.currentTimeMillis (); }} Return Old Text; }  

As you can see, once the shutdown is true, this text should be saved which is currently in the field as a string-variable, which is called the old text Set the text array to "Das spell hat berrites battenon". . "And after the countdown-method is over, set the textArea back to the old text. Sadly, this only works for a second time, and not when I try to change textaria directly.

Note: If I use this text always sets:

  textArea.setText (method ());  

then display method To give a string, but it does not work for:

  textArea.setText ("text");  

I have some properties Tried to change around, even changed my jettextfield with a JPnet and jettextare, but it is still the same problem. After setting a text directly to the 'auto update' Need to do?


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -