Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

what does SetFocusPainted() do exactly

843805Nov 21 2006 — edited Nov 21 2006
I am looking over somebody's code, that places JButtons in a JTable. Actually it places text in a JTable but then the renderer renders it as a Button. But the button has a property set setFocusPainted( False); and I can't figure out what it does. I changed it back and forth, and hten tried it out, clicking on it and stuff, and it doesn't look to be doing anything. Can somebody explain to me what it does.

Ok the API says this:
"Sets the paintFocus property, which must be true for the focus state to be painted. The default value for the paintFocus property is true. Some look and feels might not paint focus state; they will ignore this property." But I don't really understand the significance of the focus state being painted. I mean it seems like the button is being painted either way. So I must be misunderstanding something.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 19 2006
Added on Nov 21 2006
3 comments
857 views