APS Excellence in Physics Education Award
November 2019

Education Prize Logo
Science SPORE Prize
November 2011

NSF Logo
The Open Source Physics Project is supported by NSF DUE-0442581.

Background Color

Return to the EJS Modeling forum
Login to post to this thread

Color for buttons
Apostolos Michaloudis
28 Posts

I have notice that when not given a backgroung color to a button, it has a nice silver like color which it seems very nice.

I want to make a button change color on click, like :
buttonColor = new java.awt.Color(red, green, blue);
and then, i want to change it's color back to this nice default color.
What are the parameters for this color?

Also, it would be nice if we could put background images to buttons.
Is this possible?
I don't mean in drawing panel but for buttons or two state buttons.

Current Replies - View all
Re: Color for buttons   (Francisco Esquembre - )
Re: Re: Color for buttons   (Apostolos Michaloudis - )
OSP Projects:
Open Source Physics - EJS Modeling
Physlet Physics
Physlet Quantum Physics
STP Book