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

📄 clientapp.java

📁 这是一个java 语言编写能文字传输的一个万能的java 原代码程序。
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
	public void windowActivated(WindowEvent e)
	{}
	public void windowDeactivated(WindowEvent e)
	{
		
	} 
	public void victory()
	{
		JOptionPane.showMessageDialog(mainFrame, "You Win!", "Noughts and Crosses", JOptionPane.INFORMATION_MESSAGE); 
	}
	
	public void hasWon()
	{
		if(sb11==1&&sb12==1&&sb13==1)
		{
			int i = 0;
			int i2=0;
			while(i<10)
			{
				while(i2<1000)
				{
					but11.setIcon(blank);
					i2++;
				}
				i2=0;
				while(i2<100000)
				{
					but12.setIcon(blank);
					i2++;
				}
				i2=0;
				while(i2<100000)
				{
					but11.setIcon(nought);
					i2++;
				}
				i2=0;
				while(i2<100000)
				{
					but13.setIcon(blank);
					i2++;
				}
				i2=0;
				while(i2<100000)
				{
					but12.setIcon(nought);
					i2++;
				}
				i2=0;
				while(i2<100000)
				{
					but13.setIcon(blank);
					i2++;
				}
				i2=0;
				while(i2<100000)
				{
					but13.setIcon(nought);
					i2++;
				}
				i2=0;
				i++;
			}
			JOptionPane.showMessageDialog(mainFrame, "You Lost!", "Noughts and Crosses", JOptionPane.INFORMATION_MESSAGE); 
			restartGame();
			try{
				bw.write("VICTORY");
				bw.newLine();
				bw.flush();
				bw.write("RESTART");
				bw.newLine();
				bw.flush();
				
				}catch(Exception er){}
		}
 		else
 			if(sb11==1&&sb22==1&&sb33==1)
			{
				
				int i = 0;
				int i2=0;
				while(i<10)
				{
					while(i2<1000)
					{
						but11.setIcon(blank);
						i2++;
					}
					i2=0;
					while(i2<100000)
					{
						but22.setIcon(blank);
						i2++;
					}
					i2=0;
					while(i2<100000)
					{
						but11.setIcon(nought);
						i2++;
					}
					i2=0;
					while(i2<100000)
					{
						but33.setIcon(blank);
						i2++;
					}
					i2=0;
					while(i2<100000)
					{
						but22.setIcon(nought);
						i2++;
					}
					i2=0;
					while(i2<100000)
					{
						but33.setIcon(blank);
						i2++;
					}
					i2=0;
					while(i2<100000)
					{
						but33.setIcon(nought);
						i2++;
					}
					i2=0;
					i++;
			}
			JOptionPane.showMessageDialog(mainFrame, "Come Sweet Death!", "Noughts and Crosses", JOptionPane.INFORMATION_MESSAGE);
			restartGame();
			try{
				bw.write("VICTORY");
				bw.newLine();
				bw.flush();
				bw.write("RESTART");
				bw.newLine();
				bw.flush();
				
				}catch(Exception er){}
		}
 		else
		if(sb11==1&&sb21==1&&sb31==1)
		{
			
			int i = 0;
			int i2=0;
			while(i<10)
			{
				while(i2<1000)
				{
					but11.setIcon(blank);
					i2++;
				}
				i2=0;
				while(i2<100000)
				{
					but21.setIcon(blank);
					i2++;
				}
				i2=0;
				while(i2<100000)
				{
					but11.setIcon(nought);
					i2++;
				}
				i2=0;
				while(i2<100000)
				{
					but31.setIcon(blank);
					i2++;
				}
				i2=0;
				while(i2<100000)
				{
					but21.setIcon(nought);
					i2++;
				}
				i2=0;
				while(i2<100000)
				{
					but31.setIcon(blank);
					i2++;
				}
				i2=0;
				while(i2<100000)
				{
					but31.setIcon(nought);
					i2++;
				}
				i2=0;
				i++;
			}
			JOptionPane.showMessageDialog(mainFrame, "Loser!", "Noughts and Crosses", JOptionPane.INFORMATION_MESSAGE); 
			restartGame();
			try{
				bw.write("VICTORY");
				bw.newLine();
				bw.flush();
				bw.write("RESTART");
				bw.newLine();
				bw.flush();
				
				}catch(Exception er){}
		}
	 	else
		if(sb12==1&&sb22==1&&sb32==1)
		{
			
			int i = 0;
			int i2=0;
			while(i<10)
			{
				while(i2<1000)
				{
					but12.setIcon(blank);
					i2++;
				}
				i2=0;
				while(i2<100000)
				{
					but22.setIcon(blank);
					i2++;
				}
				i2=0;
				while(i2<100000)
				{
					but12.setIcon(nought);
					i2++;
				}
				i2=0;
				while(i2<100000)
				{
					but32.setIcon(blank);
					i2++;
				}
				i2=0;
				while(i2<100000)
				{
					but22.setIcon(nought);
					i2++;
				}
				i2=0;
				while(i2<100000)
				{
					but32.setIcon(blank);
					i2++;
				}
				i2=0;
				while(i2<100000)
				{
					but32.setIcon(nought);
					i2++;
				}
				i2=0;
				i++;
			}
			JOptionPane.showMessageDialog(mainFrame, "Fatality!", "Noughts and Crosses", JOptionPane.INFORMATION_MESSAGE); 
			restartGame();
			try{
				bw.write("VICTORY");
				bw.newLine();
				bw.flush();
				bw.write("RESTART");
				bw.newLine();
				bw.flush();
				
				}catch(Exception er){}
		}
	 	else
		if(sb13==1&&sb22==1&&sb31==1)
		{
			int i = 0;
			int i2=0;
			while(i<10)
			{
				while(i2<1000)
				{
					but13.setIcon(blank);
					i2++;
				}
				i2=0;
				while(i2<100000)
				{
					but22.setIcon(blank);
					i2++;
				}
				i2=0;
				while(i2<100000)
				{
					but13.setIcon(nought);
					i2++;
				}
				i2=0;
				while(i2<100000)
				{
					but31.setIcon(blank);
					i2++;
				}
				i2=0;
				while(i2<100000)
				{
					but22.setIcon(nought);
					i2++;
				}
				i2=0;
				while(i2<100000)
				{
					but31.setIcon(blank);
					i2++;
				}
				i2=0;
				while(i2<100000)
				{
					but31.setIcon(nought);
					i2++;
				}
				i2=0;
				i++;
			}
			JOptionPane.showMessageDialog(mainFrame, "AWWW.. what happened!", "Noughts and Crosses", JOptionPane.INFORMATION_MESSAGE); 
			restartGame();
			try{
				bw.write("VICTORY");
				bw.newLine();
				bw.flush();
				bw.write("RESTART");
				bw.newLine();
				bw.flush();
				
				}catch(Exception er){}
		}
		else
		if(sb21==1&&sb22==1&&sb23==1)
		{
			int i = 0;
			int i2=0;
			while(i<10)
			{
				while(i2<1000)
				{
					but21.setIcon(blank);
					i2++;
				}
				i2=0;
				while(i2<100000)
				{
					but22.setIcon(blank);
					i2++;
				}
				i2=0;
				while(i2<100000)
				{
					but21.setIcon(nought);
					i2++;
				}
				i2=0;
				while(i2<100000)
				{
					but23.setIcon(blank);
					i2++;
				}
				i2=0;
				while(i2<100000)
				{
					but22.setIcon(nought);
					i2++;
				}
				i2=0;
				while(i2<100000)
				{
					but23.setIcon(blank);
					i2++;
				}
				i2=0;
				while(i2<100000)
				{
					but23.setIcon(nought);
					i2++;
				}
				i2=0;
				i++;
			}
			JOptionPane.showMessageDialog(mainFrame, "Whos your Daddy!", "Noughts and Crosses", JOptionPane.INFORMATION_MESSAGE);
			restartGame(); 
			try{
				bw.write("VICTORY");
				bw.newLine();
				bw.flush();
				bw.write("RESTART");
				bw.newLine();
				bw.flush();
				
				}catch(Exception er){}
		}
		else
		if(sb31==1&&sb32==1&&sb33==1)
		{
			int i = 0;
			int i2=0;
			while(i<10)
			{
				while(i2<1000)
				{
					but31.setIcon(blank);
					i2++;
				}
				i2=0;
				while(i2<100000)
				{
					but32.setIcon(blank);
					i2++;
				}
				i2=0;
				while(i2<100000)
				{
					but31.setIcon(nought);
					i2++;
				}
				i2=0;
				while(i2<100000)
				{
					but33.setIcon(blank);
					i2++;
				}
				i2=0;
				while(i2<100000)
				{
					but32.setIcon(nought);
					i2++;
				}
				i2=0;
				while(i2<100000)
				{
					but33.setIcon(blank);
					i2++;
				}
				i2=0;
				while(i2<100000)
				{
					but33.setIcon(nought);
					i2++;
				}
				i2=0;
				i++;
			}
			JOptionPane.showMessageDialog(mainFrame, "You Suck at this!", "Noughts and Crosses", JOptionPane.INFORMATION_MESSAGE); 
			restartGame();
			try{
				bw.write("VICTORY");
				bw.newLine();
				bw.flush();
				bw.write("RESTART");
				bw.newLine();
				bw.flush();
				
				}catch(Exception er){}
		}
 		else
		if(sb13==1&&sb23==1&&sb33==1)
		{
			int i = 0;
			int i2=0;
			while(i<10)
			{
				while(i2<1000)
				{
					but13.setIcon(blank);
					i2++;
				}
				i2=0;
				while(i2<100000)
				{
					but23.setIcon(blank);
					i2++;
				}
				i2=0;
				while(i2<100000)
				{
					but13.setIcon(nought);
					i2++;
				}
				i2=0;
				while(i2<100000)
				{
					but33.setIcon(blank);
					i2++;
				}
				i2=0;
				while(i2<100000)
				{
					but23.setIcon(nought);
					i2++;
				}
				i2=0;
				while(i2<100000)
				{
					but33.setIcon(blank);
					i2++;
				}
				i2=0;
				while(i2<100000)
				{
					but33.setIcon(nought);
					i2++;
				}
				i2=0;
				i++;
			}
			JOptionPane.showMessageDialog(mainFrame, "You have been Defeated!", "Noughts and Crosses", JOptionPane.INFORMATION_MESSAGE); 
			restartGame();
			try{
				bw.write("VICTORY");
				bw.newLine();
				bw.flush();
				bw.write("RESTART");
				bw.newLine();
				bw.flush();
				}catch(Exception er){}
		}
	
	}
	

}

⌨️ 快捷键说明

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