posted 13 years ago
you've a number of things around the wrong way
comments should be self-explanatory
compile/run, the clicking the button numerous times will alternate between the two colors
note: if you had added 'recty' anywhere else but center, it would not have shown up (try adding it to NORTH).
without components, it normally needs to have a preferredSize set