Java JToolBar fixButton(AbstractButton button, String toolTip)

Here you can find the source of fixButton(AbstractButton button, String toolTip)

Description

fix Button

License

Creative Commons License

Declaration

private static void fixButton(AbstractButton button, String toolTip) 

Method Source Code

//package com.java2s;
//License from project: Creative Commons License 

import java.awt.Insets;

import javax.swing.AbstractButton;

public class Main {
    private static final Insets ZERO_INSETS = new Insets(0, 0, 0, 0);

    private static void fixButton(AbstractButton button, String toolTip) {
        button.setFocusable(false);/*from w  ww.j a v a2s.c  om*/
        button.setMargin(ZERO_INSETS);
        button.setToolTipText(toolTip);
    }
}

Related

  1. addToolItems(JToolBar toolBar, JComponent... items)
  2. buildToolbar(final JToolBar toolbar, final List components)
  3. createDefaultToolBar()
  4. createToolBar()
  5. createToolbar()
  6. floatToolBar(JToolBar tb, Point p)
  7. formatToolBar(JToolBar toolbar, int style)
  8. getToolbarButton(JToolBar toolbar, Action action)
  9. getToolBarFill(int orientation)