How can i Dispose Dialog box From LWUIT Component >

Ads
 

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

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

Ads