Search:

Type: Posts; User: Norm

Search: Search took 0.10 seconds.

  1. Replies
    11
    Views
    4,688

    Re: How to display error message box

    Strange that you got a NullPointerException. You need a null to get that.
  2. Replies
    11
    Views
    4,688

    Re: How to display error message box

    Read the API doc for the class. Go to this site and Find the JOptionPane class.
    Java Platform SE 6

    and then find the method in that classs that you are interested in.
  3. Replies
    11
    Views
    4,688

    Re: How to display error message box

    Your code does not consider this:
    What are the values that the showInputDialog can return? Can it return a null value?

    A variable with a null value can not be used to call a method: ...
  4. Replies
    11
    Views
    4,688

    Re: How to display error message box

    What variable has a null value at line 25? Check back in your code to see why that variable does not have a valid value and change the code so that it does have a valid value.

    What are the values...
  5. Replies
    11
    Views
    4,688

    Re: How to display error message box

    Which part don't you understand?
    Detecting when the user pressed Cancel?
    Have you read ALL the API doc for the method you are using? It is explained there.

    Displaying an error message?
    Again...
  6. Replies
    11
    Views
    4,688

    Re: How to display error message box

    How do you detect if the user hit the Cancel button? Does the method you have called return any indication of that? If so, you can use that information to make your decision.
    Pseudo code:
    show...
Results 1 to 6 of 6