@Override public void run() { Double time = execTime / 1000; String s = String.format("Execution time: %s sec - ", time); String answer; try { if(result.getValue()){ answer = "true"; lblExecutionInfo.setBackground(Color.GREEN); lblExecutionInfo.setOpaque(true); } else{ answer = "false"; lblExecutionInfo.setBackground(Color.RED); lblExecutionInfo.setOpaque(true); } lblExecutionInfo.setText(s+ title+ " "+ answer); } catch (OWLException e) { JOptionPane.showMessageDialog( QueryInterfacePanel.this, e); } }