import java.awt.*; class Ruutpaigutus implements LayoutManager{ public void layoutContainer(Container kest){ if(kest.getComponentCount()>0){ Component c=kest.getComponent(0); c.setBounds(20, 20, 60, 60); } } public void addLayoutComponent(String nimi, Component c){} public void removeLayoutComponent(Component c){} public Dimension preferredLayoutSize(Container kest){ return new Dimension(100, 100); } public Dimension minimumLayoutSize(Container kest){ return preferredLayoutSize(kest); } }