Here you can find the source of getToolBarFill(int orientation)
public static JComponent getToolBarFill(int orientation)
//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); } }