Example usage for javax.swing AbstractButton setBorder

List of usage examples for javax.swing AbstractButton setBorder

Introduction

In this page you can find the example usage for javax.swing AbstractButton setBorder.

Prototype

@BeanProperty(preferred = true, visualUpdate = true, description = "The component's border.")
public void setBorder(Border border) 

Source Link

Document

Sets the border of this component.

Usage

From source file:org.openmicroscopy.shoola.util.ui.UIUtilities.java

/**
 * Sets the UI properties of the button to unify the L&F.
 * //from  w ww  .  j a va 2 s . c  o  m
 * @param b The button.
 */
public static void unifiedButtonLookAndFeel(AbstractButton b) {
    if (b == null)
        return;
    //b.setMargin(new Insets(0, 2, 0, 3));
    //b.setBorderPainted(false);
    //b.setFocusPainted(false);
    b.setOpaque(false);
    b.setBorder(new EmptyBorder(2, 2, 2, 2));
}

From source file:org.zeromeaner.gui.reskin.StandaloneFrame.java

private static void add(JToolBar toolbar, ButtonGroup g, AbstractButton b) {
    b.setFocusable(false);/*  w w w.  ja  v a2 s.  com*/
    b.setBorder(null);
    b.setHorizontalAlignment(SwingConstants.LEFT);
    toolbar.add(b);
    if (g != null)
        g.add(b);
}