Files
narya/tests/src/java/com/threerings/miso/viewer/ViewerFrame.java
T
Michael Bayne 025f212df0 Use a BorderLayout.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1043 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-19 07:42:51 +00:00

53 lines
1.2 KiB
Java

//
// $Id: ViewerFrame.java,v 1.31 2002/02/19 07:42:51 mdb Exp $
package com.threerings.miso.viewer;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Component;
import java.awt.GraphicsConfiguration;
import javax.swing.JFrame;
/**
* The viewer frame is the main application window.
*/
public class ViewerFrame extends JFrame
{
/**
* Creates a frame in which the viewer application can operate.
*/
public ViewerFrame (GraphicsConfiguration gc)
{
super(gc);
// set up the frame options
setTitle("Scene Viewer");
setUndecorated(true);
setResizable(false);
setDefaultCloseOperation(EXIT_ON_CLOSE);
// set the frame and content panel background to black
setBackground(Color.black);
getContentPane().setBackground(Color.black);
}
/**
* Sets the panel displayed by this frame.
*/
public void setPanel (Component panel)
{
// if we had an old panel, remove it
if (_panel != null) {
getContentPane().remove(_panel);
}
// now add the new one
_panel = panel;
getContentPane().add(_panel, BorderLayout.CENTER);
}
protected Component _panel;
}