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
What is the name of the finned metal device that radiates heat away from the processor?
dezoksy [38]
This is called a "heat sink", essentially, a metal plate makes indirect <span>(its separated by thermal paste)</span> contact with the heat spreader of a cpu (central processing unit). The concept is that the heat sink is made of highly conductive materials thus conducting heat away from the CPU, quite often you'll find a fan attached to further disparate heat away from the heat-sink. These days you'll alternative cooling methods, the most common alternative is to use watercooling (another topic). GPU (graphic processing units) also have heatsinks.    
3 0
3 years ago
23. What is the value of 3 - (4 + 2 *3)/(8-2) + 7 * 2+4
Artist 52 [7]

Answer:

30 djjjjj*fjfktdyldydxpitdotdtiotdtod

8 0
3 years ago
Construct a class that will model a quadratic expression (ax^2 + bx + c). In addition to a constructor creating a quadratic expr
stich3 [128]

Answer:

Following are the code to this question:

#include <iostream>//header file

#include<math.h>//header file

using namespace std;

class Quadratic//defining a class Quadratic  

{

private:

double a,b,c;//defining a double variable

public:

Quadratic()//defining default constructor

{

a = 0;//assigning value 0  

b = 0;//assigning value 0  

c = 0;//assigning value 0  

}

Quadratic(double a, double b, double c)//defining a parameterized constructor  

{

this->a = a;//use this keyword to hold value in a variable

this->b = b;//use this keyword to hold value in b variable

this->c = c;//use this keyword to hold value in c variable

}

double getA() //defining a get method  

{

return a;//return value a

}

void setA(double a)//defining a set method to hold value in parameter

{

this->a = a;//assigning value in a variable

}

double getB() //defining a get method  

{

return b;//return value b

}

void setB(double b)//defining a set method to hold value in parameter  

{

this->b = b;//assigning value in b variable

}

double getC() //defining a get method

{

return c;//return value c

}

void setC(double c)//defining a set method to hold value in parameter

{

this->c = c;//assigning value in c variable

}

double Evaluate(double x)//defining a method Evaluate to hold value in parameter

{

return ((a*x*x)+(b*x)+c);//return evaluated value

}

double numberOfReal()//defining a method numberOfReal to calculates the real roots

{

return (b*b)-(4*a*c);//return real roots

}

void findroots()//defining a method findroots

{

double d=numberOfReal();//defining double variable to hold numberOfReal method value

if(d<0)//use if block to check value of d less than 0

cout<<"Equation has no real roots"<<endl;//print message

else

{

double r1=(-b+sqrt(numberOfReal()))/(2*a);//holding root value r1

double r2=(-b-sqrt(numberOfReal()))/(2*a);//holding root value r2

if(r1==r2)//defining if block to check r1 equal to r2

cout<<"Equation has one real root that is "<<r1<<endl;//print message with value

else//else block

cout<<"The equation has two real roots that are "<<r1<<" and "<<r2<<endl;////print message with value

}

}

void print()//defining a method print  

{

cout<< a << "x^2 + " << b << "x + " << c <<endl;//print Quadratic equation

}

};

int main()//defining main method  

{

Quadratic q(5,6,1);//creating Quadratic class object that calls parameterized constructor

q.print();//calling print method

cout<<q.numberOfReal()<<endl;//calling method numberOfReal that prints its value

q.findroots();//calling method findroots

cout<<q.Evaluate(-1);//calling method Evaluate that prints its value

return 0;

}

Output:

5x^2 + 6x + 1

16

The equation has two real roots that are -0.2 and -1

0

Explanation:

In the above code, a class "Quadratic" is declared, which is used to define a default and parameter constructor to holds its parameter value.

In the next step, the get and set method is defined that holds and returns the quadratic value, and "Evaluate, numberOfReal, findroots, and print" in the evaluate method a double variable is used as a parameter that returns evaluated value.

In the "numberOfReal" method it calculates the real roots and returns its value. In the "findroots" method a double variable "d" is declared that hold "numberOfReal" value,

and use a conditional statement to check its value, and in the print method, it prints the quadratic equation.

In the main method, the lass object it calls the parameterized constructor and other methods.

5 0
2 years ago
What is the name for the type of flash memory that is used by mobile devices to store their apps and data?
tankabanditka [31]
D. Solid state is correct
5 0
3 years ago
True or false? If you’re posting the same content across different channels, make sure you post them simultaneously—on the same
alukav5142 [94]

Answer:

The answer is true.

Explanation:

7 0
2 years ago
Other questions:
  • Which of the following is designed to help an organization continue to operate during and after a disruption?
    12·1 answer
  • Proper __ management is essenciales for meeting project deadlines​
    11·1 answer
  • These items describe guidelines for the effective use of presentation graphics. Graphics should be large enough to be seen by th
    9·1 answer
  • Enum Digits {0, 1};
    10·1 answer
  • How would you describe the relationship between blocks of code and commands?<br>HELP​
    10·1 answer
  • What do you mean by GIGO (Garbage-In-Garbage-Out) in computer system?​
    6·1 answer
  • Write the definition of a function reverse, whose first parameter is an array of integers and whose second parameter is the numb
    15·1 answer
  • Which type of choir often sings AND dances while they perform?
    9·1 answer
  • I have a problem with my Nintendo DS lite does anyone know how to fix it?
    8·1 answer
  • What is required to publish documents on the Web
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!