글
JAVA
import org.kwis.msp.lcdui.*;
import org.kwis.msp.lwc.*;
public class DialogEx extends Jlet implements ActionListener
{
ShellComponent shell = new ShellComponent();
FormComponent form = new FormComponent();
LabelComponent label1 = new LabelComponent("메시지 전송중!");
LabelComponent label2 = new LabelComponent("메지지 전송완료.");
TextBoxComponent textbox = new TextBoxComponent(null, TextBoxComponent.CONSTRAINT_ANY,80);
ButtonComponent button = new ButtonComponent("전송하기",null);
DialogComponent dialog1 = new DialogComponent(label1, "문자메시지",DialogComponent.TYPE_NONE);
DialogComponent dialog2 = new DialogComponent(label2, "문자메시지",DialogComponent.TYPE_OK);
protected void startApp(String args[]) {
dialog1.setTimeout(5000);
button.setActionListener(this, null);
form.addComponent(textbox);
form.addComponent(button);
form.setGab(5);
shell.setTitle("문자메시지 전송하기");
shell.addComponent(form);
shell.show();
}
protected void destroyApp(boolean b){}
public void action(Component c, Object o) {
if(c == button) {
dialog1.doModal();
dialog2.doModal();
textbox.setString(null);
}
}
}