litesoft
@ 947
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
// This Source Code is in the Public Domain per: http://unlicense.org package org.litesoft.aokeyhole.swing.simplecomponents; import org.litesoft.aokeyhole.swing.namevaluecomponents.*; import javax.swing.*; import java.awt.*; public class VerticalJPanel_NGandG extends JPanel implements VerticalGrowableIndicatingComponent { public VerticalJPanel_NGandG( VerticalGrowableIndicatingComponent pVGIC1, VerticalGrowableIndicatingComponent pVGIC2 ) { super( new BorderLayout( 0, 0 ) ); // Vertical add( (Component) pVGIC1, pVGIC1.growsVertically() ? BorderLayout.CENTER : BorderLayout.NORTH ); add( (Component) pVGIC2, pVGIC2.growsVertically() ? BorderLayout.CENTER : BorderLayout.SOUTH ); } @Override public boolean growsVertically() { return true; } } |