Atom Feed SITE FEED   ADD TO GOOGLE READER

Undecorated Icon JButtons

If you want your JButton to have no decoration across the standard look and feels, there's two things you need to do:
JButton myButton = new JButton(myIcon);
myButton.setBorder(BorderFactory.createEmptyBorder());
myButton.setContentAreaFilled(false);


setBorder prevents the Aqua look and feel from drawing a glassy aqua button
We need setContentAreaFilled to prevent the XP look and feel from drawing a plastic luna button

It's unfortunate that the two look and feels don't use the same API to accomplish the same result.