public void updateStates() { NumberFormat nf = NumberFormat.getInstance(); nf.setMaximumFractionDigits(2); nf.setMinimumFractionDigits(2); try { // System.out.println("getting variables."); status = cryo.cryoGetStatusCORBA(); frame.lblStatus.setText(statusString[status] + " "); heater = cryo.cryoGetHeaterCORBA(); frame.lblHeater.setText(nf.format(heater) + " watts"); temp = cryo.cryoGetTempCORBA(); frame.lblTemp.setText(nf.format(temp) + " deg"); cli = cryo.cryoGetCliCORBA(); if (Double.isNaN(cli)) { frame.lblCli.setText(cli + " "); } else frame.lblCli.setText(nf.format(cli) + " "); } catch (org.omg.CORBA.COMM_FAILURE cf) { // stop thread and try to reconnect to the server frame.lblStatus.setText("FAILURE!! Server connected?"); stop = true; return; } }