Box on JButton...R u swing king?

I have created one GUI application using jdk 1.5 when I run the same application on the Jdk 1.6 I found Button shows a dotted box when selected. I have checked for all the properties and I am sure there is no problem with that...........What might be the problem with this..Thanks
[294 byte] By [SUSHANT_Ja] at [2007-11-27 3:57:28]
# 1

hi, I have the same problem. I have created swing application on older versions of netBeans5.0 and jdk 1.5. Output is smoother in older version as compare to newer versions. Particularly, whenever a button is clicked/pressed , on new versions, it shows a dotted box at border of the button. This is not the case with older version.

My button extends the class which changes the shape of button to oval, looks very ugly when clicked/pressed. It looks something like "dotted box cutting the oval button".

is there any solution?

nikhil_shravanea at 2007-7-12 9:01:48 > top of Java-index,Desktop,Core GUI APIs...
# 2
button.setFocusPainted(false);
Michael_Dunna at 2007-7-12 9:01:48 > top of Java-index,Desktop,Core GUI APIs...
# 3
Thanks Michael_Dunn , It works!Regards
nikhil_shravanea at 2007-7-12 9:01:48 > top of Java-index,Desktop,Core GUI APIs...