Results 1 to 1 of 1
- 03-14-2012, 05:32 AM #1
Member
- Join Date
- Jan 2012
- Posts
- 4
- Rep Power
- 0
List is not working in netbean 7.1
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();
}
}
Similar Threads
-
error in sql and netbean
By vetrivelmanian in forum NetBeansReplies: 0Last Post: 08-26-2011, 08:55 AM -
help me about Netbean installation
By vando87 in forum NetBeansReplies: 4Last Post: 07-29-2011, 03:15 AM -
NetBean Vs Eclipse
By rhenus in forum New To JavaReplies: 6Last Post: 07-13-2011, 12:01 PM -
I've never use NetBean before and now ....{help}
By o0oNorao0o in forum NetBeansReplies: 3Last Post: 01-28-2010, 02:22 AM -
how to use netbean?
By lclclc in forum New To JavaReplies: 7Last Post: 08-26-2009, 12:55 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks