Specifications

Sun Services
Java™ Programming Language
Module 10, slide 9 of 37
Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision F
The FrameExample Class
1 import java.awt.*;
2
3 public class FrameExample {
4 private Frame f;
5 public FrameExample() {
6 f = new Frame("Hello Out There!");
7 }
8
9 public void launchFrame() {
10 f.setSize(170,170);
11 f.setBackground(Color.blue);
12 f.setVisible(true);
13 }
14
15 public static void main(String args[]) {
16 FrameExample guiWindow = new FrameExample();
17 guiWindow.launchFrame();
18 }
19 }