JAVA

프로그래밍 2009. 4. 19. 23:45

import org.kwis.msp.lcdui.*;
import org.kwis.msp.lwc.*;

public class TickerEx extends Jlet implements ActionListener {
 ShellComponent shell = new ShellComponent();

 FormComponent form = new FormComponent();
 TickerComponent tick = new TickerComponent("오늘은 2009년 4월 9일 입니다.",null);
 ButtonComponent button1 = new ButtonComponent("시작",null);
 ButtonComponent button2 = new ButtonComponent("정지",null);

 protected void startApp(String args[]) {
  button1.setActionListener(this, null);
  button2.setActionListener(this, null);
  tick.setDelay(1000);
  form.addComponent(tick);  form.addComponent(button1);
  form.addComponent(button2); form.setGab(10);
  shell.addComponent(form);  shell.show();
 }
 protected void destroyApp(boolean b){}

 public void action(Component c, Object o)
 {
  if(c == button1)
  {
   tick.setTickerState(true);
  }
  else if(c == button2)
  {
   tick.setTickerState(false);
  }
 }
}


'프로그래밍' 카테고리의 다른 글

JAVA  (1) 2009.04.28
JAVA  (0) 2009.04.26
JAVA  (0) 2009.04.23
JAVA  (1) 2009.04.21
JAVA  (1) 2009.04.20
JAVA  (0) 2009.04.16
JAVA  (1) 2009.04.15
JAVA  (0) 2009.04.12
JAVA  (0) 2009.04.10
JAVA  (0) 2009.04.07

설정

트랙백

댓글