Example usage for java.awt Button Button

List of usage examples for java.awt Button Button

Introduction

In this page you can find the example usage for java.awt Button Button.

Prototype

public Button() throws HeadlessException 

Source Link

Document

Constructs a button with an empty string for its label.

Usage

From source file:SampleName.java

public static void main(String[] args) {
    Button b = new Button();
    ;
    printName(b);
}

From source file:SampleSuper.java

public static void main(String[] args) {
    Button b = new Button();
    printSuperclasses(b);
}

From source file:Main.java

private void initializeButtons(DefaultMutableTreeNode node) {
    Button b;/* w  ww .ja  va  2 s .  com*/
    buttonPanel.removeAll();
    for (int i = 0; i < node.getChildCount(); i++) {
        b = new Button();
        b.setLabel("" + node.getChildAt(i));
        buttonPanel.add(b);
        buttonPanel.revalidate();
    }
}