LayoutManager, LayoutManager2, Serializable
JRootPaneprotected class JRootPane.RootLayout extends Object implements LayoutManager2, Serializable
 Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. As of 1.4, support for long term storage of all JavaBeans has been added to the java.beans package. Please see XMLEncoder.
| Modifier | Constructor | Description | 
|---|---|---|
| protected  | Constructs a  RootLayout. | 
| Modifier and Type | Method | Description | 
|---|---|---|
| void | addLayoutComponent | Adds the specified component to the layout, using the specified constraint object. | 
| void | addLayoutComponent | If the layout manager uses a per-component string, adds the component  compto the layout, associating it with the string specified byname. | 
| float | getLayoutAlignmentX | Returns the alignment along the x axis. | 
| float | getLayoutAlignmentY | Returns the alignment along the y axis. | 
| void | invalidateLayout | Invalidates the layout, indicating that if the layout manager has cached information it should be discarded. | 
| void | layoutContainer | Instructs the layout manager to perform the layout for the specified container. | 
| Dimension | maximumLayoutSize | Returns the maximum amount of space the layout can use. | 
| Dimension | minimumLayoutSize | Returns the minimum amount of space the layout needs. | 
| Dimension | preferredLayoutSize | Returns the amount of space the layout would like to have. | 
| void | removeLayoutComponent | Removes the specified component from the layout. | 
protected RootLayout()
RootLayout.public Dimension preferredLayoutSize(Container parent)
preferredLayoutSize in interface LayoutManager
parent - the Container for which this layout manager is being usedpublic Dimension minimumLayoutSize(Container parent)
minimumLayoutSize in interface LayoutManager
parent - the Container for which this layout manager is being usedpublic Dimension maximumLayoutSize(Container target)
maximumLayoutSize in interface LayoutManager2
target - the Container for which this layout manager is being usedpublic void layoutContainer(Container parent)
layoutContainer in interface LayoutManager
parent - the Container for which this layout manager is being usedpublic void addLayoutComponent(String name, Component comp)
LayoutManagercomp to the layout, associating it with the string specified by name.addLayoutComponent in interface LayoutManager
name - the string to be associated with the componentcomp - the component to be addedpublic void removeLayoutComponent(Component comp)
LayoutManagerremoveLayoutComponent in interface LayoutManager
comp - the component to be removedpublic void addLayoutComponent(Component comp, Object constraints)
LayoutManager2addLayoutComponent in interface LayoutManager2
comp - the component to be addedconstraints - where/how the component is added to the layout.public float getLayoutAlignmentX(Container target)
LayoutManager2getLayoutAlignmentX in interface LayoutManager2
target - the target containerpublic float getLayoutAlignmentY(Container target)
LayoutManager2getLayoutAlignmentY in interface LayoutManager2
target - the target containerpublic void invalidateLayout(Container target)
LayoutManager2invalidateLayout in interface LayoutManager2
target - the target container
    © 1993, 2023, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
    https://docs.oracle.com/en/java/javase/21/docs/api/java.desktop/javax/swing/JRootPane.RootLayout.html