OnJava8-Examples/ui/FlowLayout1.java

17 lines
406 B
Java
Raw Normal View History

2015-09-07 11:44:36 -06:00
// ui/FlowLayout1.java
2015-06-15 17:47:35 -07:00
// Demonstrates FlowLayout.
import javax.swing.*;
import java.awt.*;
import static com.mindviewinc.util.SwingConsole.*;
public class FlowLayout1 extends JFrame {
public FlowLayout1() {
setLayout(new FlowLayout());
for(int i = 0; i < 20; i++)
add(new JButton("Button " + i));
}
public static void main(String[] args) {
run(new FlowLayout1(), 300, 300);
}
2015-09-07 11:44:36 -06:00
}