Professional Documents
Culture Documents
6 - Flowlayout: // Layout Manager Defines The Natural Layout For Components Within A Container // Flowlayout
6 - Flowlayout: // Layout Manager Defines The Natural Layout For Components Within A Container // Flowlayout
import java.awt.FlowLayout;
import javax.swing.JButton;
import javax.swing.JFrame;
// Layout Manager = Defines the natural layout for components within a container
frame.add(new JButton("1"));
frame.add(new JButton("2"));
frame.add(new JButton("3"));
frame.add(new JButton("4"));
frame.add(new JButton("5"));
frame.add(new JButton("6"));
frame.add(new JButton("7"));
frame.add(new JButton("8"));
frame.add(new JButton("9"));
frame.setVisible(true);
}
}