Example usage for javax.swing JButton setHorizontalAlignment

List of usage examples for javax.swing JButton setHorizontalAlignment

Introduction

In this page you can find the example usage for javax.swing JButton setHorizontalAlignment.

Prototype

@BeanProperty(visualUpdate = true, enumerationValues = { "SwingConstants.LEFT", "SwingConstants.CENTER",
        "SwingConstants.RIGHT", "SwingConstants.LEADING",
        "SwingConstants.TRAILING" }, description = "The horizontal alignment of the icon and text.")
public void setHorizontalAlignment(int alignment) 

Source Link

Document

Sets the horizontal alignment of the icon and text.

Usage

From source file:wsattacker.sso.openid.attacker.gui.MainGui.java

private void removeBackgroundFromButton(JButton button) {
    button.setHorizontalAlignment(SwingConstants.LEFT);
    button.setBorder(null);/*from w  w  w .  j a va  2  s  .c om*/
    button.setBorderPainted(false);
    button.setContentAreaFilled(false);
}