Re: JButton.setMargin broken



Roedy Green <see_website@xxxxxxxxxxxxxxxxxxxx> wrote:
It seems that Swing ignores JButton.setMargin. Is that your finding?
Is this a bug or is there some excuse for it?

The margin is modelled as an extra border (e.g.
javax.swing.plaf.basic.BasicBorders.MarginBorder), usually installed
by the LookAndFeel. If you replace a button's border, put a margin
border (using CompoundBorder) in the place where you want to have it,
relative to the other border(s).


Christian
.