Example usage for javax.swing JToolBar getUI

List of usage examples for javax.swing JToolBar getUI

Introduction

In this page you can find the example usage for javax.swing JToolBar getUI.

Prototype

public ToolBarUI getUI() 

Source Link

Document

Returns the tool bar's current UI.

Usage

From source file:Main.java

public static void unfloatToolBar(JToolBar tb) {
    ToolBarUI tbUI = tb.getUI();
    if (tbUI instanceof BasicToolBarUI)
        ((BasicToolBarUI) tbUI).setFloating(false, null);
}

From source file:Main.java

public static void floatToolBar(JToolBar tb, Point p) {
    ToolBarUI tbUI = tb.getUI();
    if (tbUI instanceof BasicToolBarUI)
        ((BasicToolBarUI) tbUI).setFloating(false, p);
}