* Makefile.in (PREPROCESSOR_DEFINES): New macro.
[official-gcc.git] / libjava / java / awt / Frame.java
blob8d258f73261f54c1cedc8261507a4d29af9b4082
1 /* Copyright (C) 1999 Cygnus Solutions
3 This file is part of libjava.
5 This software is copyrighted work licensed under the terms of the
6 Libjava License. Please consult the file "LIBJAVA_LICENSE" for
7 details. */
9 package java.awt;
10 import java.awt.peer.FramePeer;
12 /* A very incomplete placeholder. */
14 public class Frame extends Window implements MenuContainer
16 MenuBar menuBar = null;
17 String title;
19 public Frame ()
20 { /* FIXME */ }
22 public Frame (String title)
24 this();
25 setTitle(title);
28 public String getTitle () { return title; }
30 public void setTitle (String title)
32 this.title = title;
33 if (peer != null)
34 ((FramePeer)peer).setTitle(title);
37 public synchronized void dispose ()
38 { /* FIXME */ }
40 public synchronized void setMenuBar (MenuBar menuBar)
41 { this.menuBar = menuBar; }
43 public synchronized void addNotify ()
45 if (peer == null)
47 FramePeer fpeer = Toolkit.getDefaultToolkit().createFrame(this);
48 // Compiler bug requires cast ??; FIXME?
49 peer = (java.awt.peer.ComponentPeer) fpeer;
50 if (width + height > 0)
51 peer.setBounds(x, y, width, height);
53 super.addNotify();