Package data

Examples of data.Clock


  }

  @Override
  public void update(Observable o, Object arg) {
    if(arg instanceof Clock) {
      Clock clock = (Clock) arg;
      hour.setText(String.valueOf(format.format(clock.getHours())));
      minute.setText(String.valueOf(format.format(clock.getMinutes())));
     
    } else if(arg instanceof HourAdjustState) {
      hour.setForeground(Color.GRAY);
      hour.setFont(fontEditing);
    } else if(arg instanceof MinuteAdjustState) {
View Full Code Here


public class Main {

  public static void main(String[] args) {

    Clock clock = new Clock();
    ClockControler controler = new ClockControler(clock);
   
    ProgramFrame frame = new ProgramFrame(controler);
    DrawClock panel = new DrawClock();
   
    clock.addObserver(panel);
    controler.addObserver(panel);
   
    frame.setSize(250, 250);
    frame.add(panel);
    frame.setVisible(true);
View Full Code Here

TOP

Related Classes of data.Clock

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.