검색결과 리스트
글
WIPI 프로그래밍 수업~~!!
아래 KISS 버튼을 누르면 LOVE그림이 뜨는 아주 간단한 실습^^
주 코드는 다음과 같다.
protected void startApp(String[] arg0) {
displayLCD = Display.getDefaultDisplay();
ShellComponent shell = new ShellComponent();
Image imgButton = null;
try
{
imgButton = Image.createImage("kiss.gif");
}
catch (IOException e) {
System.out.println("Error BABO");
System.out.println(e);
}
ButtonComponent button = new ButtonComponent(" KISS",imgButton);
button.setActionListener(new ActionListenerHandler(), shell);
shell.setCommand(button, true);
displayLCD.pushCard(shell.getCard());
}
class ActionListenerHandler implements ActionListener {
public void action(Component cmp,Object obj)
{
Image imgButton2 = null;
try
{
imgButton2 = Image.createImage("/heart.gif");
}catch(IOException e)
{
System.out.println(e);
}
ShellComponent shell = (ShellComponent)obj;
LabelComponent lb1 = new LabelComponent(" I Love You");
LabelComponent lb2 = new LabelComponent(" LOVE",imgButton2);
shell.setTitle(lb1);
shell.setWorkComponent(lb2);
}
}
'IT 이야기 > Programming' 카테고리의 다른 글
| UDDI4j를 이용한 UDDI 클라이언트 (0) | 2008/04/18 |
|---|---|
| Eclipse용 Ruby Development Tools (RDT) 플러그인 사용법 (0) | 2008/04/18 |
| MFC 클래스간 통신 (0) | 2008/04/15 |
| Vi Editor Command (0) | 2008/04/15 |
| [MFC] SplitterBar 고정시키기 (0) | 2008/04/15 |
| [WIPI 프로그래밍] KISS 버튼 (2) | 2008/04/11 |
Solo인 저로서는... 절대 저런 프로그램 만들지 않겠습니다.!!!!!!
저도 Solo인 상태에서 희망사랑으로 만든거에요~!! ㅋㅋ