Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import javax.swing.Icon;
import javax.swing.JButton;

public class Main {
    /***************************************************************************
     * Creates a {@link JButton} with settings that are common for toolbars.
     * 
     * @param tooltip
     * @param icon
     * @return
     **************************************************************************/
    public static JButton createToolbarButton(String tooltip, Icon icon) {
        JButton button = new JButton("", icon);
        button.setFocusable(false);
        button.setBorderPainted(false);
        button.setToolTipText(tooltip);
        return button;
    }
}