Example usage for javax.swing AbstractButton getMargin

List of usage examples for javax.swing AbstractButton getMargin

Introduction

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

Prototype

public Insets getMargin() 

Source Link

Document

Returns the margin between the button's border and the label.

Usage

From source file:Main.java

public static void main(String[] args) {
    AbstractButton jb = new JToggleButton("Press Me");
    jb.setSelected(true);//  www  . ja  va  2 s .c o  m
    System.out.println(jb.getMargin());

    JFrame f = new JFrame();
    f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    f.getContentPane().add(jb);
    f.pack();
    f.setVisible(true);
}