Illustration einer tropischen Insel mit Palmen und einem hohen Berg

Java Blog für Programmierer

Change insets/margin of a swing button

· Christian Ullenboom

Use this before you start the program:

UIManager.put( "Button.margin", new InsetsUIResource(10, 20, 10, 20) );

BTW: To global change the icon of you JTree use:

Icon leafIcon = new ImageIcon( bla );UIManager.put( "Tree.leafIcon", leafIcon );UIManager.put( "Tree.openIcon", openIcon );UIManager.put( "Tree.closedIcon", closedIcon );

Kategorien: Allgemein

← Alle Beiträge