⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 client.java

📁 Java mulitplayer strategy game. Adaptation of KDE Galaxy Conquest. (rules are changed - but still th
💻 JAVA
字号:
/*
 * Client.java
 *
 * Created on 17 pa焏ziernik 2005, 22:46
 *
 * To change this template, choose Tools | Options and locate the template under
 * the Source Creation and Management node. Right-click the template and choose
 * Open. You can then make changes to the template in the Source Editor.
 */

package net.sf.jawp.gui.client;

import javax.swing.UIManager;
import net.sf.jawp.api.service.JAWPGameService;

import net.sf.jawp.j3d.J3DHelper;

/**
 *
 * @author jarek
 */
public class Client
{
	static
	{
		try
		{
			UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
			System.out.println("installed:"
					+ UIManager.getLookAndFeel().getName());
		}
		catch (final Exception e)
		{
			e.printStackTrace();
		}
	}
	/** Creates a new instance of Client */
	public Client()
	{
	}
	
	/**
	 * @param args the command line arguments
	 */
	public static void main(final String[] args)
	{
		try
		{
			// TODO maciek: this is demonstration, remove it later
			System.out.println("Java3D installed: " + J3DHelper.isJava3DInstalled());
			
			final JoinGameDialog join = new JoinGameDialog( null,  true, null);
			join.setVisible( true);

			final JAWPGameService service = join.getGameService();
			//System.out.println("got service: " + service);
			if ( service != null )
			{
				final Object monitor  = new Object();
				final ClientTestForm ctf = new ClientTestForm (join.getGameService(), monitor);
				//System.out.println("form created service: " + ctf);
				ctf.setVisible( true);
				synchronized ( monitor)
				{
					try
					{
						monitor.wait();
						//System.out.println("finished monitor wait ");
					}
					catch (final InterruptedException ie)
					{
						//on purpose
					}
				}
			}

			//rmiClient.closeConnection();
		}
		finally
		{
			System.exit(0);
		}
	}
	
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -