List of usage examples for java.awt BorderLayout getLayoutComponent
public Component getLayoutComponent(Container target, Object constraints)
From source file:Main.java
public Main() { JButton btn1 = new JButton("Button1"); JButton btn2 = new JButton("Button2"); JButton btn3 = new JButton("Button3"); JButton btn4 = new JButton("Button4"); JButton btn5 = new JButton("Button5"); JButton btn6 = new JButton("Button6"); BorderLayout borderLayout = new BorderLayout(20, 30); setLayout(borderLayout);/*from w w w . j ava 2s. c o m*/ add("North", btn1); add("West", btn2); add("Center", btn3); add("South", btn5); add("East", btn6); System.out.println(borderLayout.getLayoutComponent(this, BorderLayout.NORTH)); }