Pushpa Sheela
Jbutton[] background & foregroundcolor change
0 Answer(s)      6 years and 2 months ago
Posted in : Java Beginners

how to change the color of the selected JButton in java swing.

I am create JButton in an array

JButton button[]=new JButton[100];

if i select button[5] then the Jbutton foreground and background color is changed. the remaining jbutton foreground and background color are not changed.

next i select button[9] then the button[5] foreground and background color is set to default color and the selected jbutton[9] foreground and background color is changed.

Please help me.

Ads

View Answers









Related Tutorials/Questions & Answers: