How would you ask the user to confirm an action using a dialog box?

What will be an ideal response?


A confirm dialog box that displays the options Yes, No, and Cancel can be created using theshowConfirmDialog()method in theJOptionPaneclass. Four versions of the method are available; the simplest requires a parent component (which can be null) and the String prompt that is displayed in the box. TheshowConfirmDialog()method returns an integer containing one of three possible values:JOptionPane.YES_OPTION, JOptionPane.NO_OPTION, or JOptionPane.CANCEL_OPTION.

Computer Science & Information Technology

You might also like to view...

If you have statistics on the expected frequency of condition evaluations, you should use them to make your program faster and more efficient.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

?If a notebook contains sensitive material, you can __________. 

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

Case-Based Critical Thinking Questions Case 1 ? Hannah has been hired as a graphics consultant for a company that is struggling with PowerPoint 2016. They are looking for ways to improve their graphics but maintain a professional appearance to their presentations. To secure the arrows' positions and to move them easily, Hannah ____ them.

A. aligns B. groups C. locks D. stacks

Computer Science & Information Technology

By installing and using the Active Directory Certificate Services role, a Public Key Infrastructure (PKI) is established.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology