Hi everyone


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 8 of 8

Thread: Hi everyone

  1. #1
    Join Date
    Aug 2008
    Posts
    5

    Hi everyone

    Is it possible to show the popup whent he red button is clicked int eh mobile in a blackberry mobile.

  2. #2
    Join Date
    Apr 2007
    Location
    Sterling Heights, Michigan
    Posts
    8,666
    Welcome to DevX

    What popup are you talking about?

    What red button are you talking about?

    More details please.

    (PS: What development language are you using?)
    I don't answer coding questions via PM or Email. Please post a thread in the appropriate forum section.
    Please use [Code]your code goes in here[/Code] tags when posting code.
    Before posting your question, did you look here?
    Got a question on Linux? Visit our Linux sister site.
    Modifications Required For VB6 Apps To Work On Vista

  3. #3
    Join Date
    Aug 2008
    Posts
    5

    I am using J2ME for the development

    Hi Hack,

    Thanks for replying,
    I am developing a moblie application to deploye in BlackberryMobile. In this application, I have to show the popup to the user ,when the user tries to terminate our application using the end button (red button). asking for "Do you want to terminate .....".

  4. #4
    Join Date
    Apr 2007
    Location
    Sterling Heights, Michigan
    Posts
    8,666
    Ah...Ok, I think I know what you mean, but I want to be sure.

    If someone attempts to terminate your application by hitting the Red X in the upper right hand corner, you want to display a message box asking them if they are sure they want to end the program.

    Is this correct?
    I don't answer coding questions via PM or Email. Please post a thread in the appropriate forum section.
    Please use [Code]your code goes in here[/Code] tags when posting code.
    Before posting your question, did you look here?
    Got a question on Linux? Visit our Linux sister site.
    Modifications Required For VB6 Apps To Work On Vista

  5. #5
    Join Date
    Aug 2008
    Posts
    5

    yep

    yes ,you are correct.

  6. #6
    Join Date
    Apr 2007
    Location
    Sterling Heights, Michigan
    Posts
    8,666
    Try something like
    Code:
    class WindowEventHandler extends WindowAdapter
        {
            public void windowClosing(WindowEvent e)
            {
                int exitQ = JOptionPane.YES_OPTION;
    			exitQ = JOptionPane.showConfirmDialog(Sample,
    			           "Do you wish to exit?",
    			           "Confirm Exit", JOptionPane.YES_NO_OPTION);
    			if(exitQ == JOptionPane.YES_OPTION)
    			{
    			   	System.exit(0);
    			}
    			else
    			{}
            }
        }
    I don't answer coding questions via PM or Email. Please post a thread in the appropriate forum section.
    Please use [Code]your code goes in here[/Code] tags when posting code.
    Before posting your question, did you look here?
    Got a question on Linux? Visit our Linux sister site.
    Modifications Required For VB6 Apps To Work On Vista

  7. #7
    Join Date
    Aug 2008
    Posts
    5

    Thanks for replying

    I am getting the error ,if I try to add the above function at
    WindowAdapter, JOptionPane,windowClosing(WindowEvent e).
    I am not getting the option for import also, if I use
    import java.awt.event.WindowAdapter; I am getting the package java.awt doesnot exist.

  8. #8
    Join Date
    Apr 2007
    Location
    Sterling Heights, Michigan
    Posts
    8,666
    Quote Originally Posted by testtest
    I am getting the error ,if I try to add the above function at
    WindowAdapter, JOptionPane,windowClosing(WindowEvent e).
    What is the error?
    I don't answer coding questions via PM or Email. Please post a thread in the appropriate forum section.
    Please use [Code]your code goes in here[/Code] tags when posting code.
    Before posting your question, did you look here?
    Got a question on Linux? Visit our Linux sister site.
    Modifications Required For VB6 Apps To Work On Vista

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center