JAVA

프로그래밍 2009. 4. 12. 00:22

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

public class DateEx extends Jlet implements ActionListener {
 ShellComponent shell = new ShellComponent();
 FormComponent form = new FormComponent();
 ButtonComponent button = new ButtonComponent("모드 바꾸기", null);
 
 DateFieldComponent date = new DateFieldComponent(DateFieldComponent.MODE_DATE);

 protected void startApp(String args[]) {
  button.setActionListener(this, null);

  form.addComponent(date);
  form.addComponent(button);
  form.setGab(10);
  shell.addComponent(form);
  shell.show();
 }
 protected void destroyApp(boolean b){}

 public void action(Component c, Object o) {
  switch(date.getMode())
  {
     case DateFieldComponent.MODE_DATE:
   date.setMode(DateFieldComponent.MODE_TIME_DATE);
   break;
     case DateFieldComponent.MODE_TIME_DATE:
   date.setMode(DateFieldComponent.MODE_TIME);
   break;
     case DateFieldComponent.MODE_TIME:
   date.setMode(DateFieldComponent.MODE_DATE);
   break;
  }
 }
}

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

JAVA  (1) 2009.04.21
JAVA  (1) 2009.04.20
JAVA  (0) 2009.04.19
JAVA  (0) 2009.04.16
JAVA  (1) 2009.04.15
JAVA  (0) 2009.04.10
JAVA  (0) 2009.04.07
JAVA  (0) 2009.04.04
JAVA  (0) 2009.04.03
JAVA  (0) 2009.03.31

설정

트랙백

댓글