Java Code Examples for java.awt.BorderLayout#LINE_START
The following examples show how to use
java.awt.BorderLayout#LINE_START .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Toolbar.java From Logisim with GNU General Public License v3.0 | 6 votes |
public void setOrientation(Object value) { int axis; String position; if (value == HORIZONTAL) { axis = BoxLayout.X_AXIS; position = BorderLayout.LINE_START; } else if (value == VERTICAL) { axis = BoxLayout.Y_AXIS; position = BorderLayout.NORTH; } else { throw new IllegalArgumentException(); } this.remove(subpanel); subpanel.setLayout(new BoxLayout(subpanel, axis)); this.add(subpanel, position); this.orientation = value; }