JAVA

프로그래밍 2009. 3. 27. 21:18


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

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

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
JAVA  (0) 2009.03.26
JAVA  (0) 2009.03.23
JAVA  (0) 2009.03.22
JAVA  (0) 2009.03.20
JAVA  (0) 2009.03.19

설정

트랙백

댓글