Question: 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 3 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 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 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
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
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
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 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
Tutorials   
Java Spring Hibernate Struts Training What is the meaning of Java Platform? Why Java is a platform independent language? What is the benefits of learning Core Java? Which technology should I learn after Java? What is array in java with example? How to Convert ArrayList to Array? How to substring in Java? How to format number in Java? What is instance variable in Java? How to download MySQL JDBC driver? What is Calendar class in Java? Which is the best Java tutorials for beginners? How to rename a file in Java? How to delete file in Java code? How to get day from date in Java using Calendar? How to get day of week in Java? How to calculate Date Difference in Java? How to compare date in Java? How to declare array in Java? How to calculate average of array in Java? What is Array in Java? write a java program to find the summation of all the integers entered on command line Sum of two numbers using command line arguments in Java How to create and use Array in Java? How to pass command line arguments in Java? How to create Applet Hello World? Appending String efficiently in Java How to append String in Java? How to list even numbers between 1 and 100? How to add BigDecimal in Java? What is Abstraction In Java? Which is best Beginners Java Tutorial? What is java.util package? Create list from array in Java Filter collection in Java 8 What is the best way to filter a Java Collection? Easy way to transform Collection to Array? How to convert Collection to Array in Java? What are Basic Java Language Elements? Advanced Java Tutorials in 2017 Java brief history Best Reasons to learn Java Java Example Codes and Tutorials in 2017 How do I read a large file quickly in Java? Is learning Java worthwhile? How to create first Java Program? Retrieve database from the table dynamically in jsp from oracle using servlet What does core Java include? java What are some way to learn Java quickly?

Ads

 
Advertisement null

Ads