Good question, you can call yourcomponent.repaint() to make sure the
properties  updated take effect, not updateUI() method(it is for LAF
changing).

And for JTextField, it seems a not opaque component, so if you want to
change its background color, you can do like this:
yourText.setOpaque(true);
yourText.setBackground(yourColor);
yourText.repaint(); //in fact we should call this in setBackground
method, we'll try to improve this in next release

and im not very sure that JTextField is not opaque(i'll check it when
back home), you can call isOpaque to make sure if it is. I think we
may need to make Text components opaque by default?

2005/10/6, Manuel Saint-Victor <[EMAIL PROTECTED]>:
> I was messing around with the ASWing component set and I was making some
> changes to some of the samples to learn some stuff.  I tried placing a
> JTextField component in the center of a border layout and then trued to have
> the different buttons change its color using myText.setBackground(ASColor).
> I was not able to get it to work but I could get a giant button in the middl
> to respond just fine.   Has anyone been tinkering with ASWing and come
> across anything similar.
>
> Here's a link to the version I got to work but if I change the center to a
> JTextField -no dice.
> http://www.manuelsaintvictor.com/blog/?p=72
>
>
> Mani
>
> _______________________________________________
> osflash mailing list
> [email protected]
> http://osflash.org/mailman/listinfo/osflash_osflash.org
>
>
>

_______________________________________________
osflash mailing list
[email protected]
http://osflash.org/mailman/listinfo/osflash_osflash.org

Reply via email to