Buttons not changing : <pre><code> long totalMilliSeconds = System.currentTimeMillis();
    long totalSeconds = totalMilliSeconds / 1000;
    long currentSecond = totalSeconds % 60;
    long totalMinutes = totalSeconds / 60;
    long currentMinute = totalMinutes % 60;
    long totalHours = totalMinutes / 60;
    long currentHour = totalHours % 24;
    System.out.println("Current time is:" + currentHour + ":" + currentMinute + ":" + currentSecond);


    if(currentHour &lt;= 9 &amp;&amp; currentHour &gt;=18)
        readFile.setForeground(YELLOW);
        readFile.setBackground(BLACK);
        graph.setForeground(YELLOW);
        graph.setBackground(BLACK);
        search.setForeground(YELLOW);
        search.setBackground(BLACK);
        snippet.setForeground(YELLOW);
        snippet.setBackground(BLACK);
        prediction.setForeground(YELLOW);
        prediction.setBackground(BLACK);
        export.setForeground(YELLOW);
        export.setBackground(BLACK);
        back.setForeground(YELLOW);
        back.setBackground(BLACK);
</code></pre>

<p>The program is supposed to change the colours of buttons from 6pm up until 9am but im not sure why its still changing before the set time. Any ideas would be appreciated.</p>
