Examlex

Solved

Import Java.awt.*; Import Javax.swing.*;

question 11

Essay

import java.awt.*;
import javax.swing.*;
import java.awt.Color;
public class JFrameWithColor extends JFrame
{
private final int SIZE = 180;
private Container con = getContentPane();
private JButton button =
new JButton("Press Me");
public JFrameWithColor()
{
super("Frame");
setSize(SIZE, SIZE);
con.setLayout(new FlowLayout());
con.add(button);
_____________________________________
_____________________________________
_____________________________________
}
public static void main(String[] args)
{
JFrameWithColor frame =
new JFrameWithColor();
frame.setVisible(true);
}
}
In the first shaded line provided, write the statement to set the background color of the JFrame's content pane to gray. Using the remaining two shaded lines, write the statements to set the JButton foreground color to white and the background color to blue.


Definitions:

Salience of Prices

The degree to which the price of a good or service stands out to consumers and influences their purchasing decisions.

Consumer Surplus

The difference between the total amount that consumers are willing and able to pay for a good or service and the total amount that they actually do pay.

Law of Diminishing Marginal Utility

The principle that as a person consumes more of a product, the satisfaction (utility) gained from consuming each additional unit decreases.

Diminishing Marginal Utility

is an economic principle stating that as a person increases consumption of a product, there is a decline in the additional satisfaction (utility) that person gains from consuming one more unit of the product.

Related Questions