Java JButton Settings removeButtonBorder(AbstractButton button)

Here you can find the source of removeButtonBorder(AbstractButton button)

Description

Removes the button border.

License

Open Source License

Parameter

Parameter Description
button the button

Declaration

public static void removeButtonBorder(AbstractButton button) 

Method Source Code


//package com.java2s;
import javax.swing.*;
import java.awt.*;

public class Main {
    /**//  ww  w. j  av a  2 s .  co m
     * Removes the button border.
     *
     * @param button the button
     */
    public static void removeButtonBorder(AbstractButton button) {
        button.setContentAreaFilled(false);
        button.setMargin(new Insets(0, 0, 0, 0));
        button.setBorder(BorderFactory.createEmptyBorder());
    }
}

Related

  1. numberButtonGroup(ButtonGroup buttonGroup)
  2. opacityCheck(AbstractButton b)
  3. paintClassicText(AbstractButton b, Graphics g, int x, int y, String text, int mnemIndex)
  4. parseLevel(ButtonGroup buttonGroup)
  5. removeAllActionListeners(AbstractButton btn)
  6. removeCloseButton(Component comp)
  7. removeListeners(AbstractButton button)
  8. scaleAllAbstractButtonIconsOf(Container container, int size)
  9. scaleButtonIcon(Icon icon, int size)