基于Java的远程桌面监控源代码来源: 熊哲的日志import java. io. *;import java, awt ・ Choice;import java. awt. Dialog;import java. awt. FlowLayout;import java. awt. BorderLayout;import java. awt. Font;import java. awt. Color;import java.net. Socket;import java.net. InetAddress;import javax. swing. *;import java. awt. event. ActionListener;import java. awt. event. ActionEvcnt;import java. awt. event. WindowAdapter;import java. awt. event. WindowEvent;import java. awt. event. KeyAdapter;import java. awt. event. KeyEvent;import javax. swing, tree. DcfaultMutablcTrceNodc;import javax. swing, tree. DefaultTreeCellRenderer;
import javax. swing, tree. DefaultTreeModel;import javax. swing, tree. TreePath;import javax. swing, tree. TreeNode;import java. awt. Image;import javax. swing. Imagelcon;import java. awt. Toolkit;public class midClient
{public static void main(String[] args) throws IOException
{try {
UIManagcr. sctLookAndFccl ("com. sun. jav a.swing, plaf. windows. WindowsLookAndFeeT7) ;
}catch(Exception el) {}new Ctree () ;class Ctree extends JFrame implements ActionListener
{boolean disConncct=false;boolean passOk=true;boolean startPort=false;
boolean DialogApp=false;boolean existFile;
FileOutputStream fo;
//KL*KL*KL*KL*KL*KL*KL*KL*KL*KL*KL*KL*KL*KL*KL*KL*KL*KL*KL*KL*KL*KL*KL*KL*KL*KL*KL*KL*KL*KL*KL*KL*KL*KL* If/ I
JMenuBar menu二new JMenuBar ;
JMcnu mnuFile =ncw JMenu z文件“
JMcnuItcm AddComputcr =ncw JMcnu It cm z添加新主机〃
JMenuItem mnuFileExit =new JMenultem 〃退岀〃 ;
/ / •9
II /
JButton Addcomputer二new JButton z隐藏主机“
JLabel Ilost=new JLabel 〃选择主机〃 ;
JPancl H A=ncw JPanel ;
Choice Address=new Choice ;
JLabel Connectlp=new JLabel 〃服务器IP地址“
JTextField ConnectTpText=new JTextField 14 ;
DcfaultMutablcTrccNodc Root二new DcfaultMutablcTrccNodc z远程控制管理器〃
JTree tree二new JTree Root ; ;
JPopupMenu popM二new JPopupMenu ;
JMenuItem cy_load二new JMenuItem 〃下载"
JMcnuItcm cy delcct=ncw JMenuItem 删除〃 ;
JMenuItem cy_refurbish=new JMenultem 〃刷新子项〃 ;
JFileChooser Jsave二new JFileChooser ;
JScrolIPane treePane=new JScrolIPane ;
DefaultTreeCel1 Renderer cel 1 Renderer二nul1;
DefaultMutableTreeNode nodel二null;
DefaultTreeModel treeModel;
File selectFile;
Socket ClientSocket=null; //声名一个套接字
String HostName=null;int IPPort=0;
PrintWriter out二null;
BufferedReader in二null;
〃子窗口按钮
Dialog AddHost二null;
JTextField Computer二null;
JTextField Portl=nul1;
JButton ok=new JButton 〃确定“
JButton cancel=new JButton 〃取消〃
Dialog 1isten 二nul1;
JPasswordField passw 二new JPasswordField 10 ;
JButton okl =ncw JButton z确认〃 ;
JButton cancell =new JButton C取消〃 ;
File inputFile二new F订e 〃 d:/〃
File[] list=inputFile. listRoots ;int Jrate=O;int finish二0;int ByteNum;
String fileName;boolcan copy二false;public Ct ree ()
{this ( “远程管理器〃 ) ipublic Ctree(String Title)
{super (Title) ;
Imagetitlephone二Toolkit. getDefaultToolkit() . createlmage( 〃 • /icons/client. gi D;this. seticonimage (titlephone) ;this. setSize(600, 500) ;thi s. setJMenuBar(menu) ;tree. setShowsRootHandles(true) ;
setFont () ;addWindows () ;
// tree. setEditable(false) ;
CormectlpText. setEditable(false) ;addListen() ;try
{
File AdressFile=new
File( “HostAddress ・ txt") ;if(!AdressFile. exists() )
{
AdressFi1e. createNewFi1e () ;i
FileReader readln^new
FileReader (AdressFile) ;
BufferedReader bufin二new
BufferedReader(read!n) ;
String choiceList二null;
String address, port;while( (choiceList=bufin. readLine() ) !=nul
1)
{
Root.add (new
DefaultMutableTreeNode(choiceList) ) ;
Address.add (choiceList) ;
!
bufin. closeO ;rcadln. closeO ;this. setVisible(true) ;
倉・
2
、
阿里云香港配置图提速啦是成立于2012年的十分老牌的一个商家这次给大家评测的是 阿里云香港 16核32G 20M 这款产品,单单说价格上就是十分的离谱原价8631元/月的现价只要 999元 而且还有个8折循环优惠。废话不多说直接进入正题。优惠时间 2021年8月20日-2021年9月20日 优惠码 wn789 8折优惠阿里云香港BGP专线 16核32G 10M带宽 优惠购买 399元购买链接阿里云...
OneTechCloud发布了本月促销信息,全场VPS主机月付9折,季付8折,优惠后香港VPS月付25.2元起,美国CN2 GIA线路高防VPS月付31.5元起。这是一家2019年成立的国人主机商,提供VPS主机和独立服务器租用,产品数据中心包括美国洛杉矶和中国香港,Cera的机器,VPS基于KVM架构,采用SSD硬盘,其中美国洛杉矶回程CN2 GIA,可选高防。下面列出部分套餐配置信息。美国CN...
近日CloudCone商家对旗下的大硬盘VPS云服务器进行了少量库存补货,也是悄悄推送了一批便宜VPS云服务器产品,此前较受欢迎的特价20美元/年、1核心1G内存1Gbps带宽的VPS云服务器也有少量库存,有需要美国便宜大硬盘VPS云服务器的朋友可以关注一下。CloudCone怎么样?CloudCone服务器好不好?CloudCone值不值得购买?CloudCone是一家成立于2017年的美国服务...