How to disable the cancel button in InputDialogBox?

Can someone please tell me how to disable the cancel button in an input dialog box?
thanks,

Cross posted: [http://www.coderanch.com/t/487888/Swing-AWT-SWT-JFace/java/disable-cancel-button-input-dialog]

Similar Messages

  • How to disable the cancel button in the ProgressMonitor

    hi,
    I need to know, is there any way to disable/remove the (cancel)button in the ProgressMonitor?
    One more problem is,
    Once i click the cancel button, isCanceled() return true, how to make it false again so that the process continue....
    It is very urgently.....
    please help me out.
    Thanks in advance.
    Regards,
    Deepa Raghuraman

    I don't think that's a good solution, because Cancel button itself is not disabled, so user is tempted to click it and nothing happens.
    A better but dangerous solution is this:
    progressMonitor = new ProgressMonitor(ProgressMonitorDemo.this,
                                         "Running a Long Task",
                                         "", 0, 100);
    progressMonitor.setMillisToDecideToPopup(0);
    progressMonitor.setMillisToPopup(0);
    progressMonitor.setProgress(0);
    JDialog dialog = (JDialog)progressMonitor.getAccessibleContext().getAccessibleParent();
    JOptionPane pane = (JOptionPane)dialog.getContentPane().getComponent(0);
    pane.setOptions(new Object[]{});Refer to the same question here [http://stackoverflow.com/questions/512151/how-do-i-disable-the-cancel-button-when-using-javax-swing-progressmonitor] .

  • How to disable the trackpad button function?

    My trackpad botton goes mad, it's seems like hold you mouse's left button and you can click the right button, just can't open the file, my usb mouse works great only in Snow Leopard, in Leopard I can use none of mouse or trackpad.
    I think my trackpad button has broken, I want to disable this button, but I don't know how, can you give me some advise?
    I'm using Snow leopard( 10.6.2 ) now, how to disable the trackpad button in SL?

    I'm using Snow leopard( 10.6.2 ) now, how to disable the trackpad button in SL and keep my trackpad available, I prefer using touchpad, I think I can disable the button and still use touchpad?
    I apologies for my poor english.

  • How to disable the minimize button on the JFrame?

    Does anyone know how to disable the "Minimize" button on the JFrame (Window)?

    Why bother using a JFrame at all? Just extend JDialog, and there won't be a minimize button to worry about at all. The only drawback is that a JDialog doesn't put an icon in the taskbar, so you have to move/close other windows until you can see the JDialog window on the desktop.
    The windowMinimized stuff doesn't let you stop what the window is doing -- you just get an event telling you what happened.

  • How to disable the AET button on Web UI?

    Hi all,
    Does anyone know how to disable the AET button in the Web UI? Our customer doesnu2019t want the end users to change any configuration and the only thing left for this is hide/disable the AET functionality.
    Thank you very much in advance.
    Kind regards,
    Alvaro

    Alvaro,
    The AET should not be visible to end users, especially not in the production system.
    This should be done by authorisation.
    If you are referring to the personalization, you can disable this in the businessrole by selecting a value for the parameter PERSONALIZATION.
    If there are no values available, you can maintain them in sm30 --> PERSCV_PROFILE.
    Hope this helps.
    Regards,
    Pieter Rijlaarsdam

  • How to disable the salary button

    How to disable the salary button in "Combined Per & Asg Form WKFLW_NAME="US HRMS PERSON TASKFLOW" screen function.

    You should not modify the taskflow "US HRMS PERSON TASKFLOW" directly. Instead, create a new Taskflow that contains the navigation items you require, and then create a new function that uses the Taskflow.
    1. Create a Tasklfow
    2. Create a Function using the form "Combined Per & Asg Form" including the parameter WORKFLOW_NAME="XX HRMS PERSON TASKFLOW" (or whatever you have called it)
    3. Use this function in your menu definition.
    http://download-uk.oracle.com/docs/cd/B11454_01/11.5.9/acrobat/115hradm.pdf
    See section "Configuring Oracle HRMS" for more information on Taskflows.

  • How to disable the Tools Button in Bex Analyzer

    Hi Guys,
    How do I disable the Tools button only in Bex Analyzer so as to avoid the users messing with Query Designer.
    Thanks,
    Recca

    Recca,
    Can you do this via authoirsations instead?  ie. Allow two types of users, Designers who have access and Users who don't.
    User will be able to access the Query Desinger but have no access to create or save. That should suffice.
    If you start tweaking with the toolbar it may have wider negative implications.
    Regards
    Gill

  • How to use the cancel button in showInputDialog

    um how would i go with overriding the cancel button's deafult function in JOptionPane.showInputDialog?
    in my code:
    package alphaOne;
    * this program takes in a number and gets the factorial of that number
    import javax.swing.*;
    public class Factorial {
         public Factorial() {
               * variables intilization, input is where the option pane puts the data
               * number is teh actucal number entered parsed from string result is
               * where the resutl is stored flag1 is the indicator if the user had
               * entered an integer
              String input;
              int flag1 = 0;
              int number = 0;
              long result = 0;
               * this while loop runs continously unless an integer is entered
              while (flag1 != 1)
                   try {
                        input = JOptionPane
                                  .showInputDialog("Enter the number to be factored, Integer only: ");
                        number = Integer.parseInt(input);
                        flag1 = 1;
                   } catch (NumberFormatException ea) {
                        JOptionPane.showMessageDialog(null,
                                  "The input was not a integer!", "Warning",
                                  JOptionPane.ERROR_MESSAGE);
              result = number;
              for (int x = 1; x < number; x++) {
                   result = result * (x);
              JOptionPane.showMessageDialog(null, "The result is: " + result,
                        "Result", JOptionPane.CLOSED_OPTION);
              try {
                   System.exit(0);
              } catch (SecurityException ea) {
                   System.out.print("ARRRRR its dead!");
         public static void main(String[] args) {
              Factorial One = new Factorial();
    }the cancel button does not break the while loop

    what is the value of null compared to when you compare it, and do we use the String.equals() or the String == null to compare? as seen in here i tried with input.equals(null) as a comparison but it deos not exit when i press cancel
    package alphaOne;
    * this program takes in a number and gets the factorial of that number
    import javax.swing.*;
    public class Factorial {
         public Factorial() {
               * variables intilization, input is where the option pane puts the data
               * number is teh actucal number entered parsed from string result is
               * where the resutl is stored flag1 is the indicator if the user had
               * entered an integer
              String input;
              boolean flag1 = false;
              int number = 0;
              long result = 0;
               * this while loop runs continously unless an integer is entered
              while (flag1 != true){
                   try {
                        input = JOptionPane
                                  .showInputDialog("Enter the number to be factored, Integer only: ");
                        number = Integer.parseInt(input);
                        System.out.println(input);
                        flag1 = true;
                        if (input.equals(null))
                             try {
                                  System.exit(0);
                             } catch (SecurityException ea) {
                                  System.out.print("ARRRRR its dead!");
                   } catch (NumberFormatException ea) {
                        JOptionPane.showMessageDialog(null,
                                  "The input was not a integer!", "Warning",
                                  JOptionPane.ERROR_MESSAGE);
              result = number;
              for (int x = 1; x < number; x++) {
                   result = result * (x);
              JOptionPane.showMessageDialog(null, "The result is: " + result,
                        "Result", JOptionPane.INFORMATION_MESSAGE);
              try {
                   System.exit(0);
              } catch (SecurityException ea) {
                   System.out.print("ARRRRR its dead!");
         public static void main(String[] args) {
              Factorial One = new Factorial();
    }i have also tried to ue input == null, input == "", input.equals(""), input.equals(" ")
    Message was edited by:
    TheHolyLancer
    i edited the part so it is bold
    Message was edited by:
    TheHolyLancer

  • How to disable the checkout button in saved carts window in istore

    Hi all,
    There is a requirement to disable the check out button in the saved carts window in istore.
    When a user is saving a shopping cart in istore and revisiting back to the cart after some days. he should not be able to checkout but he has to click on update and go through the checkout.
    If i could disable the checkout button then i could make all the users to click on the update button to proceed to checkout
    Any ideas please............
    Regards,
    Prasad
    Message was edited by:
    Prasad rajan

    Cross posted: [http://www.coderanch.com/t/487888/Swing-AWT-SWT-JFace/java/disable-cancel-button-input-dialog]

  • How to disable the submit button

    Hello ,
    I have multiple controls on a page . I want to disable submit button until the user enters all the fields .
    How to do this . appreciate your help in this .
    rgds
    kumar

    Hi Kumar,
    watch this post: disabling the submit button
    Tobias
    http://apex-at-work.blogspot.com

  • How to disable the Save button For a pdf?

    Hi,
    I have a requirement that when you open the livecycle developed pdf, the Save option available in the toolbar (Save As icon) and File menu of the Reader should be disabled. A button will be provided in the form separately to provide the Save functionality. Can anybody help me reg. this? Is there any setting available for this in Adobe Pro or any other tool?
    Regards,
    Maria

    It's not really difficult to disable the save button. But it depends on the context from where you want to delete it. even if you disable the save button the user has the option to print screen and create a fresh pdf. So your question has some philosophical aspects to deal with. Please mail me at [email protected] incase of further quries. I've understood your problem and have got a solution but it's not somewhat legitimate to do. I can share it with you through email.

  • How To: Disable the Print button until Required Fields are filled out

    I have a PDF Form that I have created using LiveCycle Designer 8. On my PDF Form, I have a bunch of fields that are required. Is it possible to disable the Printer button until the user fills out all the required fields? We don't want a user being able to print out an incompleted form.

    It's not possible.
    However, you can create buttons on your document that "help" the user print
    just a part of the document: a certain page range, just the current page,
    etc.

  • How to disable the "Navigator" button on Nokia 621...

    Hi,
    Anybody knows if there is a way to disable the "Navigator" button on Nokia 6210? 
    It gets accidentally pressed (when in pocket or when trying to answer a call etc.) and the GPS eats all the battery..

    this cant be disabled unfortunatly its a built in feature and as you said you keep accidently pressing it this happens im afraid
    If  i have helped at all a click on the white star below would be nice thanks.
    Now using the Lumia 1520

  • How to disable the back button when displaying a form

    Hi ,
    i have form A calling form B, when form B is displayed i want to disable the
    back button in the explorer so as not to allow the user from going back to
    form A.
    thanks.

    When you open a new window, call following javascript function also to disable the "back" button.
    window.history.forward(1);
    It will work.

  • How to disable the maximise button of a awt Frame

    Hi guys..
    Is there any way to disable the maximise button of the awt Frame (Not JFrame). I have tried the
    setResizable(false), but that one is not solving my problem. Any code will highly be Appreciated.
    tks in advance
    Jameel
    My ids r
    [email protected]
    [email protected]

    i used setResizable and it disables theframes max button
    import java.awt.*;
    import java.awt.event.*;
    public class frame extends Frame
    public frame()
    setSize(200,200);
    setVisible(true);
    setResizable(false);
    public static void main(String a[])
    new frame();
    what do u really need

Maybe you are looking for