MODE_TIME, MODE_DATE, MODE_TIME_DATE
public class DataEx extends Jlet implements ActionListener
{
ShellComponent shell = new ShellComponent();
FormComponent form = new FormComponent();
ButtonComponent button = new ButtonComponent("모드 바꾸기", null);
LabelComponent label = new LabelComponent("날짜출력");
DateFieldComponent date = new DateFieldComponent(DateFieldComponent.MODE_DATE);
protected void startApp(String[] args)
{
button.setActionListener(this, null);
form.addComponent(label);
form.addComponent(date);
form.addComponent(button);
form.setGab(10);
shell.addComponent(form);
shell.show();
}
protected void pauseApp(){};
protected void resumeApp(){};
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;
}
}
}
댓글 영역