swing - java timer will not work -


I am trying to set an int, which is defined in class, after 0 to 5 seconds Has been replaced by more than 0.. Any help will be very much appreciated!

I have a program where users have to input an additional input for the score.

Private zero input response (patient) = patient P = faucet; P = patientlist.GATE (PNIM); Maps & lt; String, list & lt; Double & gt; & Gt; PData = sEWSTracker.get (P); & Lt; Double & gt; Sep = pData.get ("SEW"); Double SEVs = sEp.get (SEP. (Size) - 1); Component frame = null; Object [] response = {"alert", "verbal", "pain", "unresponsive"}; String R = (string) joppenpan. Shownput Dialogue (frame, "Initiate the patient's reaction External stimuli: \ n", "Please report the reaction level of the patient", joppenpane.PLIN_MACSage, blank, reaction, reaction [0] ); Int reACT = 0; If (r.equals ("verbal")) {if (pNum == 0) {p0checked = 1; } If (pNum == 1) {p1checked = 1; } If (pNum == 2) {p2checked = 1; } If (pNum == 3) {p3checked = 1; } If (pNum == 4) {p4checked = 1; } If (pNum == 4) {p5checked = 1; }} If (r.equals ("pain")) {if (pNum == 0) {p0checked = 2; } If (pNum == 1) {p1checked = 2; } If (pNum == 2) {p2checked = 2; } If (pNum == 3) {p3checked = 2; } If (pNum == 4) {p4checked = 2; } If (pNum == 4) {p5checked = 2; }} If (r.equals ("unresponsive")) {if (pNum == 0) {p0checked = 3; } If (pNum == 1) {p1checked = 3; } If (pNum == 2) {p2checked = 3; } If (pNum == 3) {p3checked = 3; } If (pNum == 4) {p4checked = 3; } If (pNum == 4) {p5checked = 3; }} Double SEVP = (React * 1.0) + SUVs; & Lt; Double & gt; SoEWS ​​= pData.get ("SEW"); SoEWS.add (sEWP); This.repaint (); SEWSreact (pNum); }

There is a small message on what they represent when they say "partial score":

(for example)

< Pre> if (p0checked == 0) {g2.setColor (darkOrange); G2.fillRoundRect (250, 152, 120, 35, 10, 10); G2.setColor (mellowOrange); G2.fillRoundRect (252, 154, 116, 31, 10, 10); G2.setColor (Darkblue); G2.setFont (helvetica1); G2.drawString ("partial", 272, 170); G2.setFont (verdanda4); G2.setColor (Color.white); G2.drawString ("Click here to update", 258, 182); }}

And then a timer that resets the extra score to 0, the partial score comes back to the notice notice and the score goes back to the original. ... However, nothing happens

  if (p0checked> gt;) {timer tim = new timer (5 * 1000, new executor) {@Override Public Zero Action Action (Action Avent e) {if (timesecac = 1) {p0checked = 0;} timSec ++;}}); Tim.start (); }  

TimeSEC is also defined in the class (such as 0).


Comments

Popular posts from this blog

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -