/* * Konstruktor: Dieser hat die selben Parameter wie der SunBlind Konstruktor */ public SunBlindFrame(int id, int status, String location, String description, int[] gidTab) throws SocketException, IOException { initComponents(); sb = new SunBlind(10, 50, "Wohnzimmer aussen", "Markise", gidTab); jProgressBar1.setValue(sb.getStatus()); setLabels(); image = ImageIO.read(getClass().getResource("/de/htwhome/gui/Pics/logo.png")); this.setIconImage(image); sb.addStatusChangeListener(this); }
/* * Die Lables werden hier korrekt gesetzt */ private void setLabels() { jLabel1.setText(sb.getStatus() + "%"); jLabel2.setText(sb.getDescription()); jLabel3.setText(sb.getLocation()); jLabel4.setText("ID: " + sb.getId()); }