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

📄 client.java

📁 javaP2pgood.rar这个文件里面的代码我还没有看得懂
💻 JAVA
字号:
import javax.swing.*;
import javax.swing.event.*;
import java.awt.event.*;
import java.awt.*;
import java.net.*;
import java.io.*;
import javax.swing.table.*;
import java.util.*;

/* This is the main Class: it caters to the GUI and the starting the Peer 2 Peer Client */ 

public class client extends JFrame implements ActionListener
{
	private JButton client_open;			//
	private JButton client_refresh;			//
	private JButton client_search;			//	
	private JButton client_quit;			//   GUI Components for various purposes..
	private JButton client_view_files;		//		
	private JTable client_listing;			//
	private JScrollPane client_scroller;	//
	int count = 0;
	Container contentpane;					//  For the placeing the GUI Componments 
	JLabel copy;

	TableModel default_table;				//	 
	String names[] = {"Users Connected"};	//	For JTable GUI Component
	Object data[][] ={{null},{null},{null},{null},{null},{null},					 {null},{null},{null},{null},{null},{null},{null},{null},{null},{null},{null},{null},{null},{null},{null},{null},{null},{null},{null},{null},{null},{null},{null},{null},{null},{null},{null},{null}};
	
	private URLConnection urlconnection;	//
	private InputStream url_inputstream;	// For Connecting and gaining the information..
	private Socket client_socket;
	
	boolean go_on = true;
	boolean check = true;

	Vector values = new Vector();
	
	
	String information[][];
	int g;
	add_on connection;

	/* The constructor for the Main Class Takes Four Arguments.....*/

	//	param ... For the state in which this class is called (Search / Other ).
	//	us ... Will come into use when param is in Search Mode..  
	//	fs ... Will come into use when param is in Search Mode..
	//	present_users ... Will come into use when param is in Search Mode..

	client(String param, String us, String fs, String present_users[][])
	{
	    
	    
        setTitle ("Peer 2 Peer Client...");
	
		contentpane = getContentPane();		
		contentpane.setLayout(null);		// Setting the Layout to Absolute Layout..
		
		copy = new JLabel("

⌨️ 快捷键说明

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