public j3d_in_swing() {
setLayout(new
BorderLayout());
screenSize =
Toolkit.getDefaultToolkit().getScreenSize(); // what does the user
have his resolution set too?
theOuterframe = this; // make this a
global variable
image = new
j3d_in_swing_Image();
menu = new MenuMgr(); // make the
menus
toolbar = new TreeTableToolBar(theOuterframe);//
make the tollbar
split = new
SplitFrame();
}
public static void main(String[] args)
{
frame = new
JFrame();
new j3d_in_swing(); // make the
window
frame.getContentPane().setLayout(new
BorderLayout());
int WIDTH = 730;int HEIGHT =
570;
frame.setSize(WIDTH,
HEIGHT);
Dimension d =
Toolkit.getDefaultToolkit().getScreenSize();
frame.setLocation(d.width/2 - WIDTH/2, d.height/2 - HEIGHT/2);
// we need to manually catch the kill window
event so all our threads get completely shut down
WindowListener l = new WindowAdapter()
{
public void windowClosing(WindowEvent e)
{
System.exit(0); // kill all threads including the render and
swing
}
};
frame.addWindowListener(l);
theOuterframe.add(toolbar,
BorderLayout.NORTH);//treetable
theOuterframe.add(split, BorderLayout.CENTER);
frame.setJMenuBar(menu); // make this the menu
frame.getContentPane().add(theOuterframe, BorderLayout.CENTER);
//frame.setVisible(true);
frame.show();
}