Write a program brighterdemo that constructs a color object

Assignment Help JAVA Programming
Reference no: EM13339969

In the Java library, a color is specified by its red, green, and blue components between 0 and 255. Write a program BrighterDemo that constructs a Color object with red, green, and blue values of 50, 100, and 150. Then apply the brighter method and print the red, green, and blue values of the resulting color. (You won't actually see the color-see the next exercise on how to display the color.) but place your code into the following class. Then the color will be displayed.
import java.awt.Color;
import javax.swing.JFrame;
public class BrighterDemo
{
public static void main(String[] args)
{
JFrame frame = new JFrame();
frame.setSize(200, 200);
Color myColor = ...;
frame.getContentPane().setBackground(myColor);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setVisible(true);
}
}

Reference no: EM13339969

Questions Cloud

Write a program that displays a frame window w pixels wide : Write a program that displays a frame window W pixels wide and H pixels high. Use the Scanner to enter the values for W and H. The title of the frame is also entered by the user.
What is the cross-sectional area of the solenoid : a solenoid with length of 2.71 m and N= 311 turns/m carries a current 2.63 A. It stores 2.57 J of energy. What is the cross-sectional area of the solenoid
Compute the absolute pressure at the bottom of the container : A container is filled to a depth of 21.0 cm with water. What is the absolute pressure at the bottom of the container
Explain why the length and severity of the great depression : Assume that the demand for autoworkers declines significantly due to a decrease in demand for new automobiles. Explain what will happen to unemployment using both classical and Keynesian reasoning.
Write a program brighterdemo that constructs a color object : In the Java library, a color is specified by its red, green, and blue components between 0 and 255. Write a program BrighterDemo that constructs a Color object with red, green, and blue values of 50, 100, and 150.
Find the wavelength of the photon emitted : An electron drops from the 8 to the 6 level of an infinite square well 1.5 nm wide. Find the wavelength of the photon emitted
Find the initial voltage across the inductor : Put a 10 V battery with a 10 ? internal resistance in series with a switch: hook this up to a 100 ? resistor in parallel with a 2 H inductor. Find the initial voltage across the inductor when the switch is opened
How much pressure is exerted on the persons head : A 6 foot person stands at the bottom of a 10ft pool filled with water. How much pressure is exerted on the person's head
What is the torque due to the applied force : A wrench is used to tighten a nut. A force of 15 N is applied a distance 8.0 cm from the axis of rotation of the nut; the lever arm is 8.0 cm long

Reviews

Write a Review

JAVA Programming Questions & Answers

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd