Jürgen Gerstacker schrieb:
> I want to create LED (light emitting diodes) inside a panel, or
> rectangulars that can be given any color at any time. What is the best
> solution? java.awt.Canvas?
If using AWT (without Swing):
extend Canvas, override method paint(Graphics).
If using Swing:
extend JComponent, override method paintComponent(Graphics).

Signature
Thomas
Jürgen Gerstacker - 17 Dec 2006 09:26 GMT
> Jürgen Gerstacker schrieb:
> > I want to create LED (light emitting diodes) inside a panel, or
[quoted text clipped - 7 lines]
> --
> Thomas
A few minutes after I had posted I found a solution, that's the reason
I deleted the original post.
pan_swi[i]=new JPanel();
pan_swi[i].setPreferredSize(dim1);
pan_swi[i].setBackground(Color.black);
...
pan_swi[i].setBackground(Color.red);
Thank you for your solutions, I will try them
Juergen