亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專(zhuān)輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? pro1panel.java

?? total是最后的版本。包括的全是最新的物理層和數(shù)據(jù)鏈路層。另外還有pro1和pro2的打包程序和調(diào)用它們形成的各自的界面程序
?? JAVA
字號(hào):
// Pro1Panel.java
package chq;

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.border.*;
import chq.Pro1;
import chq.frame;

public class Pro1Panel extends JPanel implements ActionListener{ 
   	//private Container c;
   	private GridBagLayout gridbaglayout_s,gridbaglayout_r;
   	private GridBagConstraints constraints_s,constraints_r; 
   	
   	private JPanel port,sRPanel,senderPanel,Pfn,framingPanel,Ftp,slog,
   		receiverPanel,Ffp,unframingPanel,Ptn,rlog;
   	
   	private JLabel addressLabel,portLabel,frametypelab;
   	private JLabel sPfnLabel,FrameChangelab,Ftplab,
   		rFfpLabel,unFrameChangelab,rPtnlab;
   
   	private JTextField addressField,portField,sPfnField,sKFieldStr,
   		sSFieldStr,sAFieldStr,sIFieldStr,sKFieldBits,sSFieldBits,
   		sAFieldBits,sIFieldBits,sFtpField;
   	private JTextField rFfpField,rKFieldStr,rSFieldStr,rAFieldStr,
   		rIFieldStr,rKFieldBits,rSFieldBits,rAFieldBits,rIFieldBits,
   		rPtnField;
		
	private JTextArea slogArea,rlogArea;
	
	public Pro1 p1;
	public frame fr,fs;
		
	// set up GUI
	public Pro1Panel()
	{
      	//super( "Pro1Panel" );
		this.setLayout(new BorderLayout());
		
		//JPanel port,
		port=new JPanel();
		    	      	
      	addressLabel=new JLabel("Loacl Address:");
      	port.add(addressLabel);
      	addressField=new JTextField(20);
      	addressField.setEditable(false);
      	port.add(addressField);
      	
      	port.add(Box.createHorizontalStrut(10));
      	
      	portLabel=new JLabel("Local Socket Port:");
      	port.add(portLabel);
      	portField=new JTextField(3);
      	portField.setEditable(false);
      	port.add(portField);
      	
      	this.add(port,BorderLayout.NORTH);
		
		//sRPanel
		sRPanel = new JPanel();
		sRPanel.setLayout(new GridLayout(1,2));		
		
		//senderPanel 
		senderPanel = new JPanel();
		senderPanel.setLayout(new BoxLayout(senderPanel,BoxLayout.Y_AXIS));
      	
      	//JPanel Pfn
      	Pfn=new JPanel();
      	sPfnLabel=new JLabel("Data from Network :");
      	Pfn.add(sPfnLabel);
      	//Pfn.add(Box.createHorizontalStrut(5));
      	
      	sPfnField=new JTextField("input data for translating",13);
      	sPfnField.addActionListener(this);
      	Pfn.add(sPfnField);
      	
      	senderPanel.add(Pfn);
      	
      	//framingPanel with title
      	framingPanel = new JPanel();
      
      	gridbaglayout_s = new GridBagLayout();
      	framingPanel.setLayout(gridbaglayout_s);   

      	//instantiate gridbag constraints
     	constraints_s = new GridBagConstraints();
     	constraints_s.fill = GridBagConstraints.BOTH;
      	      	
      	//framing String
      	frametypelab=new JLabel("kind      seq       ack       infomation   ");
      	addComponent_f(frametypelab,0,0,4,1);
      	
      	sKFieldStr=new JTextField(4); //addComponent(x,y,with,height)
      	sKFieldStr.setEditable(false);      	
      	addComponent_f( sKFieldStr,0,1,1,1);
      	
      	sSFieldStr=new JTextField(4);
      	sSFieldStr.setEditable(false);      	
      	addComponent_f( sSFieldStr,1,1,1,1);
      	
      	sAFieldStr=new JTextField(4);
      	sAFieldStr.setEditable(false);      	
      	addComponent_f( sAFieldStr,2,1,1,1);
      	
      	sIFieldStr=new JTextField(12);
      	sIFieldStr.setEditable(false);      	
      	addComponent_f( sIFieldStr,3,1,1,1);
      	
      	//framing bits
      	FrameChangelab=new JLabel("change frame from Stirng to bits");
      	addComponent_f( FrameChangelab,0,2,4,1);
      	
      	sKFieldBits=new JTextField(4);
      	sKFieldBits.setEditable(false);      	
      	addComponent_f( sKFieldBits,0,3,1,1);
      	
      	sSFieldBits=new JTextField(4);
      	sSFieldBits.setEditable(false);      	
      	addComponent_f( sSFieldBits,1,3,1,1);
      	
      	sAFieldBits=new JTextField(4);
      	sAFieldBits.setEditable(false);      	
      	addComponent_f( sAFieldBits,2,3,1,1);
      	
      	sIFieldBits=new JTextField(12);
      	sIFieldBits.setEditable(false);      	
      	addComponent_f( sIFieldBits,3,3,1,1);
      	
      	Border loweredetched_s=BorderFactory.createEtchedBorder(EtchedBorder.LOWERED);
      	TitledBorder titleborder_s=BorderFactory.createTitledBorder(loweredetched_s,"framing");
      	framingPanel.setBorder(titleborder_s);
      	
      	senderPanel.add(framingPanel);
      	//end of framingPanel
      	
      	//JPanel Ftp
		Ftp=new JPanel();
		
		FlowLayout flowlayout_s=new FlowLayout();
		Ftp.setLayout(flowlayout_s);
		
      	Ftplab=new JLabel("Frame handed down to the PhysicalLayer: ",SwingConstants.LEFT);
      	Ftp.add(Ftplab);
      	Ftp.add(Box.createHorizontalStrut(100));
      	
      	sFtpField=new JTextField(24);
      	sFtpField.setEditable(false);
      	Ftp.add(sFtpField);
      	Ftp.add(Box.createRigidArea(new Dimension(400,50)));
      	
      	senderPanel.add(Ftp);  //end of JPanel Ftp
      	
      	//JPanel slog
      	slog=new JPanel();
      	
      	String s="Log: Protocol 1:Sender\n";
      	slogArea=new JTextArea(s,4,26);
      	slog.add(new JScrollPane(slogArea));
      	
      	Border loweredetched2_s=BorderFactory.createEtchedBorder(EtchedBorder.LOWERED);
      	TitledBorder titleborder2_s=BorderFactory.createTitledBorder(loweredetched2_s,"log");
      	slog.setBorder(titleborder2_s);// Border of log_s
      	
      	senderPanel.add(slog);
      	//End of JPanel log
      	
      	Border raisedetched=BorderFactory.createEtchedBorder(EtchedBorder.RAISED);
      	TitledBorder titleborder3_s=BorderFactory.createTitledBorder(raisedetched,"Sender");
      	senderPanel.setBorder(titleborder3_s);//Border of senderPanel
      	      	      	
      	sRPanel.add(senderPanel); //append senderPanel to c
       	//End of SenderPanel
       	
       	
       	
       	//ReceiverPanel
       	receiverPanel = new JPanel();
		receiverPanel.setLayout(new BoxLayout(receiverPanel,BoxLayout.Y_AXIS));
      	
      	//JPanel Ffp
      	Ffp=new JPanel();
      	rFfpLabel=new JLabel("Frame received from Physical-Layer :");
      	Ffp.add(rFfpLabel);
      	Ffp.add(Box.createHorizontalStrut(130));
      	
      	rFfpField=new JTextField(20);
      	rFfpField.setEditable(false);
      	Ffp.add(rFfpField);
      	Ffp.add(Box.createRigidArea(new Dimension(400,50)));
      	
      	receiverPanel.add(Ffp);
      	
      	//unframingPanel with title
      	unframingPanel = new JPanel();
      
      	gridbaglayout_r = new GridBagLayout();
      	unframingPanel.setLayout(gridbaglayout_r);   

      	//instantiate gridbag constraints
     	constraints_r = new GridBagConstraints();
     	constraints_r.fill = GridBagConstraints.BOTH;
      	      	
      	//unframing String
      	frametypelab=new JLabel("kind      seq       ack       infomation   ");
      	addComponent_uf( frametypelab,0,0,4,1);
      	
      	rKFieldBits=new JTextField(4);
      	rKFieldBits.setEditable(false);      	
      	addComponent_uf( rKFieldBits,0,1,1,1);
      	
      	rSFieldBits=new JTextField(4);
      	rSFieldBits.setEditable(false);      	
      	addComponent_uf( rSFieldBits,1,1,1,1);
      	
      	rAFieldBits=new JTextField(4);
      	rAFieldBits.setEditable(false);      	
      	addComponent_uf( rAFieldBits,2,1,1,1);
      	
      	rIFieldBits=new JTextField(12);
      	rIFieldBits.setEditable(false);      	
      	addComponent_uf( rIFieldBits,3,1,1,1);
      	
      	//unframing bits
      	unFrameChangelab=new JLabel("change frame content from bits to String");
      	addComponent_uf( unFrameChangelab,0,2,4,1);
      	
      	rKFieldStr=new JTextField(4);
      	rKFieldStr.setEditable(false);      	
      	addComponent_uf( rKFieldStr,0,3,1,1);
      	
      	rSFieldStr=new JTextField(4);
      	rSFieldStr.setEditable(false);      	
      	addComponent_uf( rSFieldStr,1,3,1,1);
      	
      	rAFieldStr=new JTextField(4);
      	rAFieldStr.setEditable(false);      	
      	addComponent_uf( rAFieldStr,2,3,1,1);
      	
      	rIFieldStr=new JTextField(12);
      	rIFieldStr.setEditable(false);      	
      	addComponent_uf( rIFieldStr,3,3,1,1);
      	
      	Border loweredetched_r=BorderFactory.createEtchedBorder(EtchedBorder.LOWERED);
      	TitledBorder titleborder_r=BorderFactory.createTitledBorder(loweredetched_r,"unframing");
      	unframingPanel.setBorder(titleborder_r);
      	
      	receiverPanel.add(unframingPanel);
      	//end of unframingPanel
      	
      	//JPanel Ptn
		Ptn=new JPanel();
		
		FlowLayout flowlayout_r=new FlowLayout();
		Ptn.setLayout(flowlayout_r);
		
      	rPtnlab=new JLabel("Packet to the NetworkLayer:",SwingConstants.LEFT);
      	Ptn.add(rPtnlab);
      	//Ptn.add(Box.createHorizontalStrut(110));
      	      	
      	rPtnField=new JTextField(13);
      	rPtnField.setEditable(false);
      	Ptn.add(rPtnField);
      	//Ptn.add(Box.createRigidArea(new Dimension(400,50)));
      	      	
      	receiverPanel.add(Ptn);  //end of JPanel Ftp
      	
      	//JPanel log
      	rlog=new JPanel();
      	
      	String rlogstring="Log: Protocol 1:Receiver\n";
      	rlogArea=new JTextArea(rlogstring,4,26);
      	rlog.add(new JScrollPane(rlogArea));
      	
      	Border loweredetched2_r=BorderFactory.createEtchedBorder(EtchedBorder.LOWERED);
      	TitledBorder titleborder2_r=BorderFactory.createTitledBorder(loweredetched2_r,"log");
      	rlog.setBorder(titleborder2_r);
      	
      	receiverPanel.add(rlog);  //End of JPanel log
      	
      	TitledBorder titleborder3_r=BorderFactory.createTitledBorder(raisedetched,"Receiver");
      	receiverPanel.setBorder(titleborder3_r);//Border of senderPanel
      	
       	sRPanel.add(receiverPanel);//append receiverPanel to Container
       	//End of receiverPanel
       	
       	
       	this.add(sRPanel,BorderLayout.CENTER);
      	//setSize(700,450);
      	//setVisible( true );
      	//end of the Container c
      	
      	p1=new Pro1();
      	addressField.setText(p1.datalink.phy.getLocalAddress());
      	portField.setText(Integer.toString(p1.datalink.phy.getLocalPort()));
      	
      	//receiving();
	} // end constructor SenderPanel
	
   // method to set constraints on. addComponent(x,y,with,height)
   	private void addComponent_f( Component component,int column, 
   			int row,int width, int height )
   	{
      // set gridx and gridy 
      	constraints_s.gridx = column;
      	constraints_s.gridy = row;

      	// set gridwidth and gridheight
      	constraints_s.gridwidth = width;   
      	constraints_s.gridheight = height;

      	// set constraints and add component
      	gridbaglayout_s.setConstraints( component, constraints_s );  
      	framingPanel.add( component );      
   	}

	private void addComponent_uf( Component component,
      			int column, int row, int width, int height )
   	{
      // set gridx and gridy 
      	constraints_r.gridx = column;
      	constraints_r.gridy = row;

      	// set gridwidth and gridheight
      	constraints_r.gridwidth = width;   
      	constraints_r.gridheight = height;

      	// set constraints and add component
      	gridbaglayout_r.setConstraints( component, constraints_r );  
      	unframingPanel.add( component );      
   	}
   	
   	public void receiving(){
		while(true){
      		fr=new frame();
   			fr=p1.receiving();
   			
   			rFfpField.setText(fr.getReceivedFrame());
   			
   			rKFieldBits.setText(fr.kindbits);
   			rSFieldBits.setText(fr.seqbits);
   			rAFieldBits.setText(fr.ackbits);
   			rIFieldBits.setText(fr.infobits);
   			
   			rKFieldStr.setText(fr.kind);
   			rSFieldStr.setText(Integer.toString(fr.seq));
   			rAFieldStr.setText(Integer.toString(fr.ack));
   			rIFieldStr.setText(fr.info);
			rPtnField.setText(fr.info);
   			
   			rlogArea.append("The oringinal frame from PhysicalLayer : \n"
   				+fr.getReceivedFrame()+"\nshowFramebits_r:\n"+
   				fr.showFramebits()+"\nshowFrameString_r:\n"+
   				fr.showFrameString()+"\nData translated to NetworkLayer:"
   				+fr.info+"\n");
   			rlogArea.setCaretPosition(rlogArea.getText().length());
		}//end of while
	}   	

	public void actionPerformed(ActionEvent e)
   	{
   		//String s="";
   		if(e.getSource()==sPfnField)
   			{String s=e.getActionCommand();
   			
   			String aimaddress=
				JOptionPane.showInputDialog("Enter Aim IP address","192.168.1.125");
      		int aimport=
    			Integer.parseInt(JOptionPane.showInputDialog("Enter Aim socketnum"));	
    
        	fs=new frame();
        	fs=p1.sending(aimaddress,aimport,s);  //call for sender1 function
    		
    		sKFieldStr.setText(fs.kind);
    		sSFieldStr.setText(Integer.toString(fs.seq));
    		sAFieldStr.setText(Integer.toString(fs.ack));
    		sIFieldStr.setText(fs.info);
    		
    		sKFieldBits.setText(fs.kindbits);
    		sSFieldBits.setText(fs.seqbits);
    		sAFieldBits.setText(fs.ackbits);
			sIFieldBits.setText(fs.infobits);
			
			sFtpField.setText(fs.getFormedFrame());
    		
    		slogArea.append("Packet from NetworkLayer containing: "
    				+s+"\nshowFramebits:\n"+fs.showFramebits()+
    				"\nData handed down to Physical_Layer is:\n"+
    				fs.getFormedFrame()+"\n");
    		slogArea.setCaretPosition(slogArea.getText().length());
			} //end of if
   	}
   	
} // end class Pro1Panel

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
制服丝袜中文字幕亚洲| 日韩毛片视频在线看| 7799精品视频| 欧美电影一区二区| 欧美午夜精品久久久| 色中色一区二区| 色琪琪一区二区三区亚洲区| 99九九99九九九视频精品| 成人福利电影精品一区二区在线观看| 国产高清视频一区| 高清av一区二区| www.爱久久.com| 色天使色偷偷av一区二区| 欧美亚洲国产一区二区三区va | 亚洲免费资源在线播放| 一区视频在线播放| 亚洲欧美偷拍另类a∨色屁股| 日韩一区中文字幕| 国产精品不卡在线观看| 亚洲欧美一区二区三区孕妇| 亚洲精品中文字幕在线观看| 亚洲国产综合色| 日韩av网站在线观看| 国内精品免费**视频| 夫妻av一区二区| 色综合久久综合| 欧美日韩精品免费观看视频| 欧美肥大bbwbbw高潮| 精品粉嫩超白一线天av| 国产婷婷色一区二区三区在线| 中文字幕亚洲在| 婷婷中文字幕一区三区| 国产一区二区三区四区五区美女 | 91免费精品国自产拍在线不卡| 色综合天天综合色综合av| 欧美性猛片xxxx免费看久爱| 日韩欧美在线1卡| 中文字幕av一区二区三区免费看 | 亚洲成人资源在线| 蜜臀a∨国产成人精品| 床上的激情91.| 欧美欧美欧美欧美| 国产欧美精品一区二区三区四区| 亚洲一区二区三区中文字幕在线| 久久99国产精品久久99 | 日韩免费观看2025年上映的电影| 久久久久久久性| 亚洲永久精品国产| 韩国视频一区二区| 在线观看91精品国产入口| 欧美精品一区二区三区蜜桃视频| 亚洲视频免费看| 麻豆91在线播放免费| 91亚洲永久精品| 久久色中文字幕| 亚洲电影你懂得| 国产乱色国产精品免费视频| 欧美性猛交xxxx黑人交| 国产色产综合色产在线视频| 亚洲一卡二卡三卡四卡五卡| 国产一区二区免费在线| 欧美日韩精品欧美日韩精品| 国产精品久久影院| 蜜臀久久99精品久久久久宅男| 色综合久久久网| 国产色一区二区| 麻豆精品久久久| 欧美日韩在线播放三区四区| 国产精品青草久久| 精品一区二区影视| 欧美男生操女生| 一区二区三区.www| av中文字幕亚洲| 国产日韩欧美制服另类| 麻豆精品新av中文字幕| 欧美日韩亚洲国产综合| 亚洲免费观看高清完整版在线观看熊 | 91视频精品在这里| 国产性做久久久久久| 麻豆久久一区二区| 7777精品伊人久久久大香线蕉的| 亚洲另类在线一区| 成人福利视频网站| 国产欧美一区二区精品秋霞影院 | 91理论电影在线观看| 久久久久久免费网| 麻豆中文一区二区| 4438x亚洲最大成人网| 亚洲国产日韩在线一区模特| 99久久婷婷国产| 国产亚洲va综合人人澡精品| 国产美女娇喘av呻吟久久| 日韩美女天天操| 日本伊人精品一区二区三区观看方式| 欧美性做爰猛烈叫床潮| 亚洲精品欧美二区三区中文字幕| 成人av在线一区二区三区| 久久精品一区蜜桃臀影院| 国产米奇在线777精品观看| 久久亚洲精华国产精华液| 久久精品国产免费看久久精品| 91麻豆精品国产91久久久久久| 亚洲国产精品久久不卡毛片 | 亚洲黄色尤物视频| 99久久99精品久久久久久| 亚洲欧美欧美一区二区三区| 91在线国产观看| 亚洲人成影院在线观看| 日本道免费精品一区二区三区| 一色桃子久久精品亚洲| 91美女福利视频| 亚洲在线观看免费视频| 欧美性受xxxx| 免费观看30秒视频久久| 精品国精品国产尤物美女| 国产精一品亚洲二区在线视频| 久久精品视频在线看| 丁香亚洲综合激情啪啪综合| 中文字幕一区二区三区在线观看| 91视视频在线直接观看在线看网页在线看| 综合在线观看色| 欧美三级中文字幕在线观看| 免费在线一区观看| 久久这里只有精品首页| 成人激情校园春色| 亚洲激情欧美激情| 欧美电影影音先锋| 国产伦精品一区二区三区免费迷| 中国av一区二区三区| 色先锋久久av资源部| 午夜精品视频在线观看| 精品福利在线导航| 成人av高清在线| 亚洲va在线va天堂| 精品久久一区二区三区| 福利一区二区在线观看| 亚洲一区在线观看免费观看电影高清| 欧美三级欧美一级| 国内精品写真在线观看| 一区在线观看免费| 欧美一级搡bbbb搡bbbb| 国产精品77777| 亚洲一区二区成人在线观看| 精品免费国产二区三区 | 日韩免费电影一区| 99综合影院在线| 日韩国产精品91| 国产精品久久久久aaaa樱花| 欧美视频精品在线观看| 国产美女精品在线| 亚洲一二三区视频在线观看| 久久网这里都是精品| 欧美日韩在线免费视频| 日韩欧美在线123| 成人黄页在线观看| 日本系列欧美系列| 亚洲免费毛片网站| 久久久精品国产免大香伊| 色婷婷久久99综合精品jk白丝| 激情综合色丁香一区二区| 亚洲精品乱码久久久久久日本蜜臀| 欧美一区在线视频| 色综合久久精品| 韩国v欧美v亚洲v日本v| 一区二区三区丝袜| 国产视频一区二区三区在线观看| 欧美日韩高清一区二区不卡| 波多野结衣一区二区三区| 美女一区二区久久| 亚洲综合一区二区三区| 亚洲国产高清不卡| 日韩欧美激情在线| 欧美天天综合网| 成人免费看视频| 精品一区二区三区久久| 香蕉乱码成人久久天堂爱免费| 国产欧美精品一区| 精品裸体舞一区二区三区| 欧美日韩一区小说| 色88888久久久久久影院按摩| 国产黄色精品网站| 久久99精品一区二区三区 | 91免费版pro下载短视频| 激情欧美一区二区三区在线观看| 亚洲亚洲人成综合网络| 亚洲欧洲三级电影| 国产欧美1区2区3区| 欧美变态凌虐bdsm| 538在线一区二区精品国产| 色诱亚洲精品久久久久久| 成人福利视频网站| 懂色av中文一区二区三区| 国产一区二三区| 蜜臀av性久久久久蜜臀aⅴ四虎| 亚洲妇熟xx妇色黄| 夜夜嗨av一区二区三区中文字幕| 国产精品白丝在线| 国产日产欧美一区二区视频| 久久久影视传媒| 久久在线观看免费|