Last updated by Roedy Green ©1996-1999 Canadian Mind Products.
Stuck in a frame? Click here to break out.
The GUI then repaints some components on it own and indirectly generates ComponentEvent.COMPONENT_RESIZED, PaintEvent.UPDATE and PaintEvent.PAINT events to request the Java side of things handle the painting. These are enqueued into the SystemEventQueue just like ordinary events. These events in turn trigger the update() and paint() methods of the affected component to be called.
What triggers a repaint? There is a chain of occurrences:
When you mix paints, the primary colours are red, yellow and blue, but when you mix beams of light, (as on a CRT screen), the primary colours are red, green and blue. The primaries differ because every extra pigment subtracts from the light reflected and every extra beam of light adds to the light projected. The asymmetry is still puzzling. Why is the primary yellow replaced by green, when you switch from pigments to light beams, but red stays invariant?
The rules of how you can simulate non-primary colours (i.e. other frequencies on the visual spectrum) by blending primaries are a function, not of physics, but of biology -- how the human vision receptors work. There is thus no requirement for the scheme to be simple or logical, just functional.
There are four kinds of colour receptor in your eye. One set of
cones are most sensitive to light at 420 nm (nanometers)
(blue-violet), another set to 434 nm (blue), rods at 498 (green),
and another set of cones cones at 564 (yellow-green). (This goes
counter to my intution. I suspect an error either in those
frequencies or in the colours shown below for those frequencies.
It seems intuitively to me my eyes are most sensitive in the
yellow-orange region.) Each is sensitive to other colours
(frequencies) as well but it drops off around the most sensitive
point in roughly a bell shaped curve. Rods are sensitive to low
light intensities. They function primarily for night vision.
Colour vision works by your brain comparing the frequency of firing of the various types of receptor. You can thus fool the brain into thinking it is seeing orange, for example, by showing it a beam of red light at the same time as a beam of green light at 2/3 the intensity. That produces a similar aggregate stimulating effect on the receptors that a beam of pure orange 630 nm light would.
There are colours like brown and purple that don't appear on the spectrum. They are made of a mixture of true spectral colours. They too can be simulated with mixtures of red, green and blue light. See the University of Toronto Colour page, the Computer Vision links, HSB, CYMK.
![]() |
![]() |
![]() | |
![]() |
Canadian Mind Products | You can get an updated copy of this page from http://mindprod.com/jglossr.html | The Mining Company's
Focus on Java Best of the Net Award |