LayoutData
, Serializable
, Comparable<BorderLayout.Location>
public static enum BorderLayout.Location extends Enum<BorderLayout.Location> implements LayoutData
BorderLayout
for its
layout manager. This values specified where inside the panel the component should be added.Enum Constant | Description |
---|---|
BOTTOM |
The component with this value as its layout data will occupy the bottom side of the container, attempting to
allocate the preferred height of the component and at least the preferred width, but could be more depending
on the other components added.
|
CENTER |
The component with this value as its layout data will occupy the center space, whatever is remaining after
the other components (if any) have allocated their space.
|
LEFT |
The component with this value as its layout data will occupy the left side of the container, attempting to
allocate the preferred width of the component and at least the preferred height, but could be more depending
on the other components added.
|
RIGHT |
The component with this value as its layout data will occupy the right side of the container, attempting to
allocate the preferred width of the component and at least the preferred height, but could be more depending
on the other components added.
|
TOP |
The component with this value as its layout data will occupy the top side of the container, attempting to
allocate the preferred height of the component and at least the preferred width, but could be more depending
on the other components added.
|
Modifier and Type | Method | Description |
---|---|---|
static BorderLayout.Location |
valueOf(String name) |
Returns the enum constant of this type with the specified name.
|
static BorderLayout.Location[] |
values() |
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final BorderLayout.Location CENTER
public static final BorderLayout.Location LEFT
public static final BorderLayout.Location RIGHT
public static final BorderLayout.Location TOP
public static final BorderLayout.Location BOTTOM
public static BorderLayout.Location[] values()
for (BorderLayout.Location c : BorderLayout.Location.values()) System.out.println(c);
public static BorderLayout.Location valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullCopyright © 2020. All rights reserved.