JAVA

프로그래밍 2009. 3. 22. 22:12


import org.kwis.msp.lcdui.Jlet;
import org.kwis.msp.lcdui.Display;
import org.kwis.msp.lwc.ShellComponent;
import org.kwis.msp.lwc.FormComponent;
import org.kwis.msp.lwc.LabelComponent;
import org.kwis.msp.lwc.ButtonComponent;

public class FormComponentEx1 extends Jlet{
 class ExtendedForm extends FormComponent{
  private int gab;
  public ExtendedForm(){
   super();
  }
  public ExtendedForm(int x ){
   super(); setGab(x);
  }
  public ExtendedForm(boolean b, int x ){
   super(b); setGab(x);
  }
 }
 Display displayLCD;
 ShellComponent shell;
 ExtendedForm form;

 public FormComponentEx1(){
  displayLCD = Display.getDefaultDisplay();
  shell = new ShellComponent();
 }

 protected void startApp(String[] arg0){
  LabelComponent label1 = new LabelComponent("Label 1");
  LabelComponent label2 = new LabelComponent("Label 2");
  LabelComponent label3 = new LabelComponent("Label 3");
  ButtonComponent button1 = new ButtonComponent("Button",null);

  label1.setBackground(0x00ffff00);
  label2.setBackground(0x00ff0000);
  label3.setBackground(0x00ff00ff);
  form = new ExtendedForm(10);
  form.addComponent(label1);
  form.addComponent(label2);
  form.addComponent(label3);
  form.addComponent(button1);

  shell.addComponent(form);
  shell.setTitle("   Form Component");

  displayLCD.pushCard(shell.getCard());
  
 }

 protected void destroyApp(boolean arg0) {}

}

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

JAVA  (0) 2009.04.03
JAVA  (0) 2009.03.31
JAVA  (2) 2009.03.27
JAVA  (0) 2009.03.26
JAVA  (0) 2009.03.23
JAVA  (0) 2009.03.20
JAVA  (0) 2009.03.19
JAVA  (1) 2009.03.17
JAVA  (0) 2009.03.16
JAVA  (1) 2009.03.13

설정

트랙백

댓글