Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Java Expert


Home >> Java

Explain System Colors in java 1.1?

In Java 1.1, the java.awt.SystemColor class is a subclass of java.awt.Color that gives color constants in which match native component colors. For instance, if you needed to make the background color of your applet, the similar as the background color of a window, you may use this init() method:

public void paint (Graphics g) {

g.setColor(SystemColor.control);
g.fillRect(0, 0, this.getSize().width, this.getSize().height);

}

These are the available system colors:

• SystemColor.desktop // Background color of desktop
• SystemColor.activeCaption // Background color for captions
• SystemColor.activeCaptionText // Text color for captions
• SystemColor.activeCaptionBorder // Border color for caption text
• SystemColor.inactiveCaption // Background color for inactive captions
• SystemColor.inactiveCaptionText // Text color for inactive captions
• SystemColor.inactiveCaptionBorder // Border color for inactive captions
• SystemColor.window // Background for windows
• SystemColor.windowBorder // Color of window border frame
• SystemColor.windowText // Text color inside windows
• SystemColor.menu // Background for menus
• SystemColor.menuText // Text color for menus
• SystemColor.text // background color for text
• SystemColor.textText // text color for text
• SystemColor.textHighlight // background color for highlighted text
• SystemColor.textHighlightText // text color for highlighted text
• SystemColor.control // Background color for controls
• SystemColor.controlText // Text color for controls
• SystemColor.controlLtHighlight // Light highlight color for controls
• SystemColor.controlHighlight // Highlight color for controls
• SystemColor.controlShadow // Shadow color for controls
• SystemColor.controlDkShadow // Dark shadow color for controls
• SystemColor.inactiveControlText // Text color for inactive controls
• SystemColor.scrollbar // Background color for scrollbars
• SystemColor.info // Background color for spot-help text
• SystemColor.infoText // Text color for spot-help text 

Java, Programming

  • Category:- Java
  • Reference No.:- M9547864

Have any Question?


Related Questions in Java

Assignment game prototypeoverviewfor this assessment task

Assignment: Game Prototype Overview For this assessment task you are expected to construct a prototype level/area as a "proof of concept" for the game that you have designed in Assignment 1. The prototype should function ...

Assessment -java program using array of Assessment -JAVA Program using array of objects

Assessment -JAVA Program using array of objects Objectives This assessment item relates to the course learning outcomes as stated in the Unit Profile. Details For this assignment, you are required to develop a Windowed G ...

Can someone please help me with the following java

can someone please help me with the following java question The input is an N by N matrix of nonnegative integers. Each individual row is a decreasing sequence from left to right. Each individual column is a decreasing s ...

Object-oriented software development1 introduction 11

OBJECT-ORIENTED SOFTWARE DEVELOPMENT 1. Introduction 1.1 Assignment Requirement 1.2 Deliverables and Structure (what to submit) 1.3 Software Restrictions 1.4 How to score high... 1.5 Assumptions 2. System Requirements 2. ...

Assessment database and multithread programmingtasktask 1

Assessment: Database and Multithread Programming Task Task 1: Grade Processing University grading system maintains a database called "GradeProcessing" that contains number of tables to store, retrieve and manipulate stud ...

Retail price calculatorwrite a java program that asks the

Retail Price Calculator Write a JAVA program that asks the user to enter an item's wholesale cost and its markup percentage. It should then display the item's retail price. For example: (If an item's wholesale cost is 5. ...

Solving 2nd degree equationsbull write the following java

Solving 2nd degree equations • Write the following Java methods • boolean real-sols(double a, double b, double c): it returns true if the 2nd degree equation ax2 + bx + c has real solutions • double solution1(double a, d ...

Assignment - method in our madnessthe emphasis for this

Assignment - "Method in our Madness" The emphasis for this assignment is methods with parameters. In preparation for this assignment, create a folder called Assign_3 for the DrJava projects for the assignment. A Cityscap ...

Part a specification - robot simulationpart a

PART A Specification - Robot Simulation PART A Requirements To complete this assignment you will use the supplied eclipse project Robot P1/. It is already set up to execute a simple arm movement loop which you will build ...

In relation to javaa what is constructor the purpose of

(In relation to Java) A. What is constructor? the purpose of default constructor? B. How do you get a copy of the object but not the reference of the object? C. What are static variables and instance variables? D. Compar ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As