0

Possible Duplicate:
How can I Dispose Dialog box From LWUIT Component

I am Using the Following Lwuit code to display a Dialogbox. when I press Key 0 a dialog should show as like in Switch case 48. When I press Key 4 that dialog should be closed and backside form should be displayed.go through the code and let me know the error or is there any changes to be done in the Code.

public class javaForm extends Component implements ActionListener
{

Dialog d=new Dialog();


public void keyPressed(int key){

     System.out.println("Key pressed :"+key);

            switch(key)
            {


                case 48:
                        d.show(130,20,30,30,true);
                        break;

                case 42:
                        d.dispose();
                        break;

                default:

                       break;
            }

}

public void actionPerformed(ActionEvent ae) 

{

 throw new UnsupportedOperationException("Not supported yet.");

}

}
Community
  • 1
  • 1
Shankar
  • 11
  • 5

0 Answers0