import javax.swing.*;
import java.awt.*;
public class FlowLayoutTest  {
    public static void main(String[] args) {
      Font fn = new Font("Microsoft Sans Serif", Font.BOLD, 14);
      JFrame f = new JFrame("FlowLayOut Test");
      JPanel p = new JPanel();
      p.setLayout (new FlowLayout ());
      JButton a = new JButton("หนึ่ง");
      JButton b = new JButton("สอง");
      JButton c = new JButton("สาม");
      JButton d = new JButton("สี่");
      JButton e = new JButton("ห้า");
      JButton g = new JButton("หก");
      JButton h = new JButton("เจ็ด");
      JButton i = new JButton("แปด");
      JButton j = new JButton("เก้า");
      a.setFont(fn); b.setFont(fn); c.setFont(fn);
      d.setFont(fn); e.setFont(fn); g.setFont(fn);
      h.setFont(fn); i.setFont(fn); j.setFont(fn);
      p.add(a);      p.add(b);      p.add(c);
      p.add(d);      p.add(e);      p.add(g);
      p.add(h);      p.add(i);      p.add(j);
      f.add(p);
      f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
      f.setSize(200, 180);
      f.setVisible(true);
  }
}