Specifications
Sun Services
Java™ Programming Language
Module 10, slide 18 of 37
Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision F
A Simple FlowLayout Example
13
14 public void launchFrame() {
15 f.setLayout(new FlowLayout());
16 f.add(b1);
17 f.add(b2);
18 f.pack();
19 f.setVisible(true);
20 }
21
22 public static void main(String args[]) {
23 LayoutExample guiWindow = new LayoutExample();
24 guiWindow.launchFrame();
25 }
26
27 } // end of LayoutExample class










