public final class ComponentUtil extends Object
| Modifier and Type | Method | Description |
|---|---|---|
static void |
centerComponentInComponent(Component parent,
Component toBeCentered) |
Use this static method if you want to center a component over another
component.
|
static void |
centerComponentInWindow(Component component) |
Use this static method if you want to center a component in Window.
|
static void |
centerComponentInWindow(Component component,
int percentOfScreen) |
Use this static method if you want to center and set its position
compared to the size of the current users screen size.
|
public static void centerComponentInWindow(Component component, int percentOfScreen)
component - the component you want to center and set size onpercentOfScreen - the percent of the current screensize you want the component
to bepublic static void centerComponentInWindow(Component component)
component - the component you want to center in windowpublic static void centerComponentInComponent(Component parent, Component toBeCentered)
parent - the component you want to use to place it ontoBeCentered - the component you want to centerCopyright © 1998-2018 Apache Software Foundation. All Rights Reserved.