Java™ Platform
Standard Ed. 8
java.awt

Interface LayoutManager2

    • Method Detail

      • addLayoutComponent

        void addLayoutComponent(Component comp,
                                Object constraints)
        Adds the specified component to the layout, using the specified constraint object.
        Parameters:
        comp - the component to be added
        constraints - where/how the component is added to the layout.
      • getLayoutAlignmentX

        float getLayoutAlignmentX(Container target)
        Returns the alignment along the x axis. This specifies how the component would like to be aligned relative to other components. The value should be a number between 0 and 1 where 0 represents alignment along the origin, 1 is aligned the furthest away from the origin, 0.5 is centered, etc.
      • getLayoutAlignmentY

        float getLayoutAlignmentY(Container target)
        Returns the alignment along the y axis. This specifies how the component would like to be aligned relative to other components. The value should be a number between 0 and 1 where 0 represents alignment along the origin, 1 is aligned the furthest away from the origin, 0.5 is centered, etc.
      • invalidateLayout

        void invalidateLayout(Container target)
        Invalidates the layout, indicating that if the layout manager has cached information it should be discarded.
Java™ Platform
Standard Ed. 8

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2022, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.

微信小程序

微信扫一扫体验

微信公众账号

微信扫一扫加关注

发表
评论
返回
顶部