2 Replies Latest reply: Oct 9, 2012 8:56 AM by 790570 RSS

    InpuVerifier control routine and exit button

    790570
      Hallo everyone.

      I am a newbie of java language.

      I try to write a demo program where there are input control of two field in a swing panel.

      The control are like this:

      field_1.setInputVerifier(control_function....)
      field_2.setInputVerifier(control_function....)

      they are declared in the constructor method.

      Of course there is a messagge error if field is empty.

      In the panel there are two command button as "exit" and "find"

      Now if I push exit button the program shows messagge that fields is empty.

      After this the program exits normally

      Is there a possibility of avoid inputVerifier control routine if I push exit button or another command button ?

      thanks in advance

      Dan

      Italy
        • 1. Re: InpuVerifier control routine and exit button
          TPD-Opitz
          please show us the code of your "exit" button and any method called by it (and use
           tags...).
          
          bye
          TPD                                                                                                                                                                                                                                
          • 2. Re: InpuVerifier control routine and exit button
            790570
            solved

            just to do:

            cancelButton.setVerifyInputWhenFocusTarget(false);
            ricButton.setVerifyInputWhenFocusTarget(false);

            .......

            field_1.setInputVerifier(control_function....)
            field_2.setInputVerifier(control_function....)

            Dan