public StatusPanel(){
        p1.setLayout(f);
        p1.add(l1);
        p1.add(l12);
        p1.add(l13);
        this.setLayout(new GridLayout(0, 1));
        this.add(p1);
        this.add(new JSeparator());
        p2.setLayout(f);
        p2.add(l2);
        p2.add(l22);
        p2.add(l23);
        this.add(p2);
        this.add(new JSeparator());
        TimerTask task2 = new TimerTask() {
            public void run() {
                if(Init.IS_LIGHT){l12.setText("On");}
                else if (!Init.IS_LIGHT){l12.setText("Off");}
                if(LightPanel.cal1!=null){
                       Calendar cale=Calendar.getInstance();
                       cal3 = Calendar.getInstance();
                        if(Init.IS_LIGHT){
                        cal3.setTime(new Date(LightPanel.cal2.getTimeInMillis()-cale.getTimeInMillis()));
                        cal3.roll(Calendar.HOUR_OF_DAY,-7);
                        l13.setText("  Turn off in: "+cal3.get(Calendar.HOUR_OF_DAY)+"h "+cal3.get(Calendar.MINUTE)+"m "+cal3.get(Calendar.SECOND)+"s");}
                    else if(!Init.IS_LIGHT){

                            cal3.setTime(new Date(LightPanel.cal1.getTimeInMillis()-cale.getTimeInMillis()));
                            cal3.roll(Calendar.HOUR_OF_DAY,-7);
                            l13.setText("  Turn on in: "+cal3.get(Calendar.HOUR_OF_DAY)+"h "+cal3.get(Calendar.MINUTE)+"m "+cal3.get(Calendar.SECOND)+"s");
                        }
                }
                else if (LightPanel.cal1==null){}
                if(!StatusPanel.l22.equals(new String(""))){
                       cal3 = Calendar.getInstance();
                       //l24.setText();
                }
            }
        }   ;
         timer.schedule(task2,new Date(),1000);
    }