How can i Dispose Dialog box From LWUIT Component >

Ads

 
 

Share on Google+Share on Google+

shankar N
How can i Dispose Dialog box From LWUIT Component >
0 Answer(s)      5 years and 7 months ago
Posted in : Java Beginners

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.");
    }
 }
Ads
View Answers
Ads









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 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 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 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
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
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
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
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 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
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
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
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
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
jquery dialog box center
jquery dialog box center  How to create dialog box with center alignment in jquery..?   $('my-selector').dialog('option', 'position', 'center
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
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
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 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