Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Java-Beginners How can i Dispose Dialog box From LWUIT Component >
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


shankar N
How can i Dispose Dialog box From LWUIT Component >
0 Answer(s)      3 years 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.");
    }
 }

Advertisement
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 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
Advertisements
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 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
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
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
. 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
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 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 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
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
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 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
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 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
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
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
Dojo Dialog Box
and how to create it in dojo. Try Online: Dialog Box Dialog Box : Dialog box... a command. In dialog box users can entered your information.     ...Dojo Dialog Box         
Show Dialog Box in Java
the appropriate message and user can finish the message dialog box... buttons. You can set several values for viewing several message dialog box... how to show a message dialog box when you click on the button
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
Advertisements
 

 

 

DMCA.com