How can i Dispose Dialog box From LWUIT Component >

How can i Dispose Dialog box From LWUIT Component >

Hi All,

i am Developing one mobile application using lwuit,Midlet.in that am trying to show a dialog when i press key "0". again if i press key "4" the Dialog should be closed.i leave My sample Code Here.go through and let me know the error.Dialog is showing but after i press key 4, there is know response

import com.sun.lwuit.Dialog;
import com.sun.lwuit.Dialog.*;
import com.sun.lwuit.events.ActionEvent;
import com.sun.lwuit.events.ActionListener;
import com.sun.lwuit.plaf.Border.*;
public class javaForm extends Component implements ActionListener
 {
    Dialog d;
    javaForm()
     {
       d=new Dialog(); 
     }

public void keyPressed(int key)
  {
    System.out.println("Key pressed :"+key);

      switch(key)
       {
               case 48:
                       d.show();
                       break;
               case 52:
                       d.dispose();
                       break;
               default:
                       break;
                    } 
      }
 public void actionPerformed(ActionEvent ae) 
   {
       throw new UnsupportedOperationException("Not supported yet.");
    }
 }
View Answers









Related Tutorials/Questions & Answers:
How can i Dispose Dialog box From LWUIT Component >
How can i Dispose Dialog box From LWUIT Component >  Hi All, i... to show a dialog when i press key "0". again if i press key "4" the Dialog should...*; public class javaForm extends Component implements ActionListener { Dialog
how can i store text box values as it is in database table
how can i store text box values as it is in database table  CUSTOMER DESCRIPTION
Advertisements
How to call print dialog box through JMenuItem?
How to call print dialog box through JMenuItem?  What is the way to call the print dialog box through JMenuItem to print the current page like we can do in javascript by calling window.print() function
how can retrive value from combo box in servlet?
how can retrive value from combo box in servlet?  i have a jsp page with combobox. And i want to get value from combox to servlet
How can I dynamically load user-entered data as content of jquery dialog?
How can I dynamically load user-entered data as content of jquery dialog? ... whatelse I am missing. Kindly guide me how to solve my project please. I cannot make the value of user-entered name to show in the dialog content. I am also trying
how to call the print dialog box through JMenuItem
how to call the print dialog box through JMenuItem  What is the way to call the print dialog box through JMenuItem to print the current page...could you please help me by sending code
how to let img act as file dialog box?
how to let img act as file dialog box?  dear sir: I'm trying to add the code input type="file" to my website, but i do not want the default design which is the text box plus the button written in it browse,NO. what i want
dialog box size allignment
dialog box size allignment  actually i have 1 button,when clicked on it has to show dialog box containing 14 rows and 3 columns(jtextfield... box only i am able to view the 14 rows and 3 columns of data.with out resizing how
dialog box
possible numeric choice answers. at the end of the interview, use a dialog box...dialog box  hello. write an application that displays a series... chooses to quit, and then display the results of each question indicate how many users
dialog box
possible numeric choice answers. at the end of the interview, use a dialog box...dialog box  hello. write an application that displays a series... chooses to quit, and then display the results of each question indicate how many users
dialog box
possible numeric choice answers. at the end of the interview, use a dialog box...dialog box  hello. write an application that displays a series... chooses to quit, and then display the results of each question indicate how many users
dialog box
possible numeric choice answers. at the end of the interview, use a dialog box...dialog box  hello. write an application that displays a series... chooses to quit, and then display the results of each question indicate how many users
dialog box
possible numeric choice answers. at the end of the interview, use a dialog box...dialog box  hello. write an application that displays a series... chooses to quit, and then display the results of each question indicate how many users
dialog box
possible numeric choice answers. at the end of the interview, use a dialog box...dialog box  hello. write an application that displays a series... chooses to quit, and then display the results of each question indicate how many users
dialog box
dialog box to ask to quit or continue  hello. write an application... of the interview, use a dialog box to ask whether the user wants to - enter another set... question indicate how many users chose the first option,second option and so
dialog box
dialog box to show latest question  hello. write an application... of the interview, use a dialog box to ask whether the user wants to - enter another set... question indicate how many users chose the first option,second option and so
jquery dialog box center
jquery dialog box center  How to create dialog box with center alignment in jquery..?   $('my-selector').dialog('option', 'position', 'center
How can I get specific data from JSON
How can I get specific data from JSON  Hi, How can I get specific data from JSON? Thanks
how to make an image act like upload dialog box
he/she wants. i know that the code for this is but what i want is i want the upload dialog box to be accessed from an image, like an attachment image. i...how to make an image act like upload dialog box  dear sir: i have
how to make an image act like upload dialog box
he/she wants. i know that the code for this is but what i want is i want the upload dialog box to be accessed from an image, like an attachment image. i...how to make an image act like upload dialog box  dear sir: i have
dialog box
. at the end of the interview, use a dialog box to ask whether the user wants..., and then display the results of each question indicate how many users chose the first option
dialog box
of the interview, use a dialog box to ask whether the user wants to - enter another set... question indicate how many users chose the first option,second option and so
dialog box
. at the end of the interview, use a dialog box to ask whether the user wants... the results of each question indicate how many users chose the first option,second
how can i run ASP.Net Server from netbeans IDE?
how can i run ASP.Net Server from netbeans IDE?  please help me how can i run ASP.Net Server from netbeans IDE? in other word , I have a web services published with IIS7 and I want to use it from my Application My Application
How can i pass the valus from a JSP to the action class???
How can i pass the valus from a JSP to the action class???  hewllo wevryone... can anyone help me with how i can pass the value of menuId in my JSP and pass it in the action class
How can i read a file from nth line onwards in java
How can i read a file from nth line onwards in java  Hi, I need to read a file content from its nth line onwards till end. How can i implement it in java. Regards, Chinnu
Popup dialog box in java
Popup dialog box in java  How to display popup dialog box in java... can create popup dialog box. Java swing toolkit provide tow types of dialog box... dialogs-user can customize dialog box. Here is a simple popup message dialog box
How Can I get ArrayList of Data from jsp with ajax request
How Can I get ArrayList of Data from jsp with ajax request  Hi, I retereved 5 Employee Record of Data from Struts Action class to jsp with ajax response. But I don't how how can reterve this dynamic 5 employee records
How can I learn Data Science from scratch?
How can I learn Data Science from scratch?  Hi, I am beginner... to learn: How can I learn Data Science from scratch? Try to provide me good examples or tutorials links so that I can learn the topic "How can I learn Data
How can I start learning machine learning from scratch?
How can I start learning machine learning from scratch?  Hi, I am... for the tutorials to learn: How can I start learning machine learning from scratch? Try... "How can I start learning machine learning from scratch?". Also tell me
how i conditional access the data from database using combo box. - JSP-Servlet
how i conditional access the data from database using combo box.   i have combox box named class when i select its value 11 or 12, another combo box appears named Subject values Arts, Commerce, Science. how i conditional
How can i download these java related materials from rose india
How can i download these java related materials from rose india  How can i download these java related materials from rose india   Hello... tutorial do you want to download from the site? Please specify it. Thanks
Want to learn java - How i can learn Java from scratch?
Want to learn java - How i can learn Java from scratch?  Hi, Want to learn java - How i can learn Java from scratch? Give me some guide. Thanks   Want to learn java - How i can learn Java from scratch
How can I get specific data from JSON
How can I get specific data from JSON  Hi, How can I get specific data from JSON? Thanks   Hi, In Python you can use the json library... shows how you can get the user from the json: >>> import json >>>
dialog box
dialog box  hi.write an application containing three parallel arrays... averages. use dialog boxes to accept a student ID number and display the student's...]; int average[]=new int[10]; for(int i=0;i<id.length;i
Combo Box operation in Java Swing
;    In this section, you can learn how to operate the Combo Box component, you will learn how to add items to the combo box, remove items from the combo box. This program shows a text field, a combo box
how to get selected name from combo box
how to get selected name from combo box   i have fetched all records of worker i.e worker name. on a test.jsp and dispayed it into combo box ...my question is that............. i havt to get particular id of worker on selection
how to get selected name from combo box
how to get selected name from combo box   i have fetched all records of worker i.e worker name. on a test.jsp and dispayed it into combo box ...my question is that............. i havt to get particular id of worker on selection
how to get selected name from combo box
how to get selected name from combo box  i have fetched all records of worker i.e worker name. on a test.jsp and dispayed it into combo box ...my question is that............. i havt to get particular id of worker on selection
how to get selected name from combo box
how to get selected name from combo box  i have fetched all records of worker i.e worker name. on a test.jsp and dispayed it into combo box ...my question is that............. i havt to get particular id of worker on selection
how to get selected name from combo box
how to get selected name from combo box  i have fetched all records of worker i.e worker name. on a test.jsp and dispayed it into combo box ...my question is that............. i havt to get particular id of worker on selection
how can i send a mail to a particular user from a many user dropdown list in jsp
how can i send a mail to a particular user from a many user dropdown list in jsp  how can i a sent a user question to a particular person from a drop down list in jsp
how can i display the dates of one week by selecting the date randomly from the calendar?
how can i display the dates of one week by selecting the date randomly from... display the calendar, simultaneously i want to display the list of seven dates from the date selected from the calendar. how can we display the dates by picking
Dojo Dialog Box
and how to create it in dojo. Try Online: Dialog BoxADS_TO_REPLACE_1 Dialog Box.... Some dialog boxes present warnings and options to choose from before windows can carry out a command. In dialog box users can entered your information. 
Show Dialog Box in Java
can finish the message dialog box by clicking the "Ok" button. A message dialog box which has two or three buttons. You can set several... Show Dialog Box in Java - Swing Dialogs   
how can i define only one method from the interface. - Java Beginners
how can i define only one method from the interface.  If i am having an interface with 3 methods(declaration) . If i want to use only one method... the solution for that. please i want it immediately.  Hi friend
i want to type the intput in the output console box how?
i want to type the intput in the output console box how?  i want to type the intput in the output console box how
How can i extract email ids from xls/xlsx file in java?
How can i extract email ids from xls/xlsx file in java?  that's the code..... i tried to extract email id;s from xls file........... but it doesn;t...); for (int i = 0; i < dataHolder.size(); i
How can I POST form data from a C#/ASP.NET to a remote website?
How can I POST form data from a C#/ASP.NET to a remote website?  I'm trying to send data to a remote PHP website. I want to send the data in sessions using HTTP POST. The thing is, my website is built in C#/ASP.NET, and I don't
how to send joption panel dialog from server to multipleclients using sockets?
how to send joption panel dialog from server to multipleclients using sockets?  how to send joption panel dialog from server to multipleclients using sockets?like we get a first message with 2 buttonsand on clicking one button we

Ads