开发者

LWUIT Event Handling

开发者 https://www.devze.com 2023-03-29 18:34 出处:网络
In a LWUIT form when I Command Listener and when I use Action Listener ,give me a example.In a lWUIT form how to go one from to another form when I click a Button.Pleas开发者_如何学编程e give me a cod

In a LWUIT form when I Command Listener and when I use Action Listener ,give me a example.In a lWUIT form how to go one from to another form when I click a Button.Pleas开发者_如何学编程e give me a code regarding this.


command Lister is default j2me library class while ActionListner is lwuit class,

i reccomend to use ActionListner example

declare class as

see this example Introduction_to_Lightweight_User_Interface_Toolkit

EDIT

public void actionPerformed(ActionEvent event) {
  if(event.getSource() == nyButton){
    Form secondForm = new Form();
    secondForm.show();
  }
}
0

精彩评论

暂无评论...
验证码 换一张
取 消