Java JToolBar getToolBarFill(int orientation)

Here you can find the source of getToolBarFill(int orientation)

Description

get Tool Bar Fill

License

Open Source License

Declaration

public static JComponent getToolBarFill(int orientation) 

Method Source Code


//package com.java2s;

import java.awt.Dimension;

import javax.swing.Box;

import javax.swing.JComponent;

import javax.swing.SwingConstants;

public class Main {
    public static JComponent getToolBarFill(int orientation) {
        Dimension dim = null;//  w  w w  .ja v  a2  s .  c  o m
        if (orientation == SwingConstants.HORIZONTAL) {
            dim = new Dimension(2, 1);
        } else {
            dim = new Dimension(1, 2);
        }
        return new Box.Filler(dim, dim, dim);
    }
}

Related

  1. createToolbar()
  2. fixButton(AbstractButton button, String toolTip)
  3. floatToolBar(JToolBar tb, Point p)
  4. formatToolBar(JToolBar toolbar, int style)
  5. getToolbarButton(JToolBar toolbar, Action action)
  6. getToolbarOrientation(String location)
  7. hideChildButtonsWithTooltip(Container parent, String tooltip)
  8. initIconButton(AbstractButton button, String toolTip)
  9. isToolBarButton(JComponent c)