1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
fiasKO [112]
3 years ago
10

How is the JOptionPaneclass used to display a dialog box that performs a yes/noconfirmation?

Computers and Technology
1 answer:
8_murik_8 [283]3 years ago
8 0

Answer:

JOptionPane.showConfirmDialog() function with the option_type parameter set to JOptionPane.YES_NO_OPTION

Explanation:

JOptionPane is a java swing class which enables users to display different kinds of  standard dialog boxes such as - InputDialog, MessageDialog, ConfirmDialog or OptionDialog.

In order to display a Yes/No confirmation we can use JOptionPane.showConfirmDialog() function. This function takes a parameter called option_type. In order to display Yes/No options for the confirmation dialog, the option_type parameter needs to be set to the value JOptionPane.YES_NO_OPTION.

You might be interested in
Python Coding:
leva [86]

Answer:

# Here we are asking the user for a number two times

userInput1 = input("Enter any #: ")

userInput2 = input("Enter any # again: ")

# We compare if userInput1 is greater than userInput2

if(userInput1 > userInput2):

   # Print userInput1 if userInput1 is greather than userInput2

   print("First Number: " + userInput1)

   # Otherwise, print userInput2

else:

   print("Second Number: " + userInput2)

# Initiate a while-loop

while(True):

   # The lines below are from above

   userInput1 = input("\nEnter any #: ")

   userInput2 = input("Enter any # again: ")    

   if(userInput1 > userInput2):

       print("First Number: " + userInput1)

   else:

       print("Second Number: " + userInput2)

   # We ask the user whether they would like to stop

   stop = input("\nWould you like to stop? (Yes or No)")

   # Compare the String stop with "Yes"

   if(stop == "Yes"):

       # If true then break

       break

Explanation:

The use of \n is unnecesary, but it skips a line and provides more readability.

5 0
2 years ago
Assign a variable solveEquation with a function expression that has three parameters (x, y, and z) and returns the result of eva
larisa [96]

Answer:

<em>The programming language is not stated;</em>

<em>However, the program written in Python is as follows</em>

def solveEquation(x,y,z):

     result = z - y + 2 * x

     print(result)

x = float(input("x = "))

y = float(input("y = "))

z = float(input("z = "))

print(solveEquation(x,y,z))

Explanation:

This line defines the function solveEquation

def solveEquation(x,y,z):

This line calculates the expression in the question

     result = z - y + 2 * x

This line returns the result of the above expression

     print(result)

The next three lines prompts user for x, y and z

x = float(input("x = "))

y = float(input("y = "))

z = float(input("z = "))

This line prints the result of the expression

print(solveEquation(x,y,z))

3 0
2 years ago
If you have questions about taxes, where can you go to get answers?
Andrews [41]

Answer:

Explanation:

i was told to paste this to other comment sections sooo...HEY PLS DON'T JOIN THE ZOOM CALL OF A PERSON WHO'S ID IS 825 338 1513 (I'M NOT SAYING THE PASSWORD) HE IS A CHILD PREDATOR AND A PERV. HE HAS LOTS OF ACCOUNTS ON BRAINLY BUT HIS ZOOM NAME IS MYSTERIOUS MEN.. HE ASKS FOR GIRLS TO SHOW THEIR BODIES AND -------- PLEASE REPORT HIM IF YOU SEE A QUESTION LIKE THAT. WE NEED TO TAKE HIM DOWN!!! PLS COPY AND PASTE THIS TO OTHER COMMENT SECTIONS

4 0
2 years ago
Jennifer has written a short story for children. What should be her last step before she submits the story for publication?
SSSSS [86.1K]

Answer:

What is the choice of being answer c?

6 0
3 years ago
What is the default text-wrapping option when inserting images into a Word document?
JulijaS [17]

Answer:

In line with the text

Explanation:

8 0
3 years ago
Read 2 more answers
Other questions:
  • If an ARQ algorithm is running over a 40-km point-to-point fiber optic link then:
    12·1 answer
  • Write a memo to the vice president, outlining the steps an employee might have taken to create an e-mail message and make it app
    15·1 answer
  • manufacturers are making an effort to build energy-efficient computers and use recyclable cases and packaging true or false
    10·1 answer
  • Which of the following statements opens the file info.txt for both input and output? a) dataFile.open("info.txt", ios::in &amp;&
    11·2 answers
  • Which components exist in the contextual tab for tables called Design? Check all that apply. Table Styles Export Table Data Prop
    11·2 answers
  • Explain motherboard in detail
    14·2 answers
  • How will you maintain electrical tools and equipment?
    12·2 answers
  • Blockchain is often associated with Bitcoin and the financial services industry. However, it is applicable to almost every indus
    13·1 answer
  • Which factor affects reading speed the most?
    9·1 answer
  • Scientist Galileo Galilei used the
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!