Goal: create a threaded "WaitIndicator" JComponent that itself consists of 12 "LightSegment" JComponents arranged in a circle like on the face of a clock. When triggered, WaitIndicator should sequentially paint a LightSegment its base color and the previous LightSegment set to grey.
This code does not yet try the threading or triggering or sequencing, just initializes an instance of WaitIndicator. For the moment I've hardcoded the initial colors of the 12 LightSegments to make debugging easier.
Problem: I'm not seeing the 12 LightSegments initialized to their correct colors - all appear black. So I'm obviously doing something wrong.
As always, all hints, suggestions, comments, constructive critisms and especially examples are all welcome.
TIA,
Still-learning Steve
Campbell Ritchie
Sheriff
Joined: Oct 13, 2005
Posts: 26720
posted
0
Where are you painting the elements in segArray?
You appear to be painting the circle 12 times.
There are all sorts of style and design issues, too.