Pregunta

I have a component that inherits Component and then does it's own paint routine. I let the background paint itself (in a native look) and would like to alter the colours I use in the paint routine to match that background. Is it possible to find what kind of background has been chosen by the system when using a native theme?

¿Fue útil?

Solución

f.getStyle().getBgColor();

Will work for forms or components (where f is the form, in this example).

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top