What is color in awt, JAVA Programming

Assignment Help:

What is Color in AWT?

Color is a class in the AWT. Individual colors such as red or mauve are examples of this class, java.awt.Color. Be sure to import it if you want to use other than the default colors. You form new colors using the same RGB triples in which you use to set background colors on web pages. Therefore you use decimal numbers instead of the hex values used through HTML's bgcolor attribute. For instance medium gray is Color(127, 127, 127). Pure white is Color(255, 255, 255). Pure red is (255, 0, 0) and so on. As with any variable you should provide your colors descriptive names. For instance

Color medGray = new Color(127, 127, 127);
Color cream = new Color(255, 231, 187);
Color lightGreen = new Color(0, 55, 0);

A few of the most common colors are available by name. These are

• Color.black
• Color.blue
• Color.cyan
• Color.darkGray
• Color.gray
• Color.green
• Color.lightGray
• Color.magenta
• Color.orange
• Color.pink
• Color.red
• Color.white
• Color.yellow


Related Discussions:- What is color in awt

Sudoku class used in java program, Sudoku Class (Simple Version) The ...

Sudoku Class (Simple Version) The Sudoku class will encapsulate the minimum necessary data and logic to manipulate, print, and set the SudCells , in anticipation of a high

Create java threads, Create a thread in either a C or a Java program and ru...

Create a thread in either a C or a Java program and run it. The thread should read a keyboard value "x" and exit from the code, or it can also use an "ESC" to exit. That is, the t

I need integrate template to java system, I need integrate template to Java...

I need integrate template to Java system Project Description: We have around 60 files for a java backend and want to implement a template, the system is complete it requires

Animal trim java, Create an application for an animal-fur trimming service....

Create an application for an animal-fur trimming service. The business is open 15 weeks of the year, from April through July. The fee for a small animal (under 6 pounds) is $100, a

Explain java flow control, Explain java flow control ? if els...

Explain java flow control ? if else else if while for do while switch case break continue goto is a reserved word.

Explain the essential api concepts associated with j2me, Question : (a)...

Question : (a) Class file verification in CLDC is different from class file verification in J2SE. Explain and discuss how and why it is different, illustrating your answer

Want a graph database for relationship mapping of entities, Want a graph da...

Want a graph database for relationship mapping of entities Project Description: I want a graph database for relationship mapping of entities, liable peoples. Also, the databa

Java., the textbok is Introduction to Java™ Programming, Brief Version, Eig...

the textbok is Introduction to Java™ Programming, Brief Version, Eighth Edition Week 8 Exercises Chapter 8 Programming Exercises from Pages 295 - 299. Do Exercise Problems 2,

Write Your Message!

Captcha
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