[mobility] List is not working in netbean 7.1

  • From: "ssnpdkt" < >
  • To:
  • Subject: [mobility] List is not working in netbean 7.1
  • Date: Wed, 14 Mar 2012 05:03:50 +0000

Hi,
 
When i try to insert j2me list control in my project. i develop the project 
through net bean 7.1. It does not show any error and not show list control in 
form.
 Here the code.
 
import java.io.IOException;
 import javax.microedition.lcdui.*;
 import javax.microedition.midlet.*;
 public class mylist extends MIDlet implements CommandListener {
 private Display display;
 private List list;
 private Command exit, next;
 public mylist(){
 list=new List("Check",List.EXCLUSIVE);
 
}
 public void commandAction(Command c, Displayable s){
 int id=list.getSelectedIndex();
 if(c.equals("next")){
 Alert alert = new Alert("Selected", "You have selected: " + 
list.getString(id) 

+ ".", null, AlertType.INFO);
 display.setCurrent(alert, list);
 }
 else if(c == exit){
 destroyApp(true);
 }
 }
 public void startApp(){
 display = Display.getDisplay(this);
 list.append("Ok", null);
 list.append("No",null);
 next = new Command("Select", Command.SCREEN, 0);
 exit = new Command("Exit", Command.EXIT, 0);
 list.addCommand(next);
 list.addCommand(exit);
 list.setCommandListener(this);
 display.setCurrent(list);
 }
 public void pauseApp(){
 
}
 public void destroyApp(boolean unconditional){
 notifyDestroyed();
 }
 
}






[mobility] List is not working in netbean 7.1

ssnpdkt 03/14/2012

Project Features

About this Project

Mobility was started in November 2009, is owned by dstrupl, and has 37 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20131025.e7cbc9d). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close