/** * Advanced Real-Time Simulation Lab (ARS) - Carleton University * * PROJECT: Web Service-Enabled DCD++ Client * AUTHOR(S): Rami Madhoun * PURPOSE: Euaclyptus * CMD LINE ARG: * OUTPUT: * DATE CREATED: Nov 25, 2006 * LAST MOD: Jan 10, 2007 * LAST MOD BY: Rami Madhoun * COPYRIGHT: ARS-Carleton University * USAGE: * COMMENTS: **/ package ca.gc.nrc.iit.pds.appgui.simulation; import java.awt.Toolkit; import javax.swing.SwingUtilities; import javax.swing.UIManager; import java.awt.Dimension; //import org.jvnet.substance.*; public class Client { boolean packFrame = false; /** * Construct and show the application. */ public Client() { MainFrame frame = new MainFrame(); // Validate frames that have preset sizes // Pack frames that have useful preferred size info, e.g. from their layout if (packFrame) { frame.pack(); } else { frame.validate(); } // Center the window Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); Dimension frameSize = frame.getSize(); if (frameSize.height > screenSize.height) { frameSize.height = screenSize.height; } if (frameSize.width > screenSize.width) { frameSize.width = screenSize.width; } frame.setLocation((screenSize.width - frameSize.width) / 2, (screenSize.height - frameSize.height) / 2); frame.setVisible(true); } /** * Application entry point. * * @param args String[] */ public static void main(String[] args) { SwingUtilities.invokeLater(new Runnable() { public void run() { try { UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName()); } catch (Exception exception) { exception.printStackTrace(); } new Client(); } }); } }