Atom Feed SITE FEED   ADD TO GOOGLE READER

JButton borders

With Swing's Windows look & feel, you can remove the border from a JButton by replacing it with null:
    JButton myButton = ...
myButton.setBorder(null)

Unfortunately this code has no effect in the Aqua look & feel!

Therefore whenever you remove the border from a JButton, replace it with an empty border:
    JButton myButton = ...
myButton.setBorder(BorderFactory.createEmptyBorder())


This is annoying because the null seems to work. It's a subtle instance of Write Once, Debug Everywhere!
Yahhh
Really helped ..Thanks
Finally found after half an hour violently hitting my head on the wall.

Thanks a lot.