글
JAVA
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);
}
}
}