2020-09-02

public Monitor(){
		jt1=new JTable(200, 10);
		jt1.setPreferredScrollableViewportSize(new Dimension(900,540));

		jt1.setRowHeight(90);
		jt1.getTableHeader().setReorderingAllowed(false);   //不可整列移动   
		jt1.getTableHeader().setResizingAllowed(false);   //不可拉动表格
		jt1.setEnabled(false);
		
		jsp3=new JScrollPane(jt1);
		jta1=new JTextArea(27,20);
		jta1.setBorder(new TitledBorder("实时告警信息"));
		jta2=new JTextArea(3,20);
		jta2.setBorder(new TitledBorder("实时Ping测信息"));
		jsp1=new JScrollPane(jta1);
		jsp1.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
		jsp2=new JScrollPane(jta2);
		jsp2.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
		jl1=new JLabel("间隔(填入整数毫秒):");
		jtf1=new JTextField(10);
		jtf1.setText("500");
		jb1=new JButton("添加");
		jb1.addActionListener(this);
		jb2=new JButton("删除");
		jb2.addActionListener(this);
		jb3=new JButton("启动");
		jb3.addActionListener(this);
		jb4=new JButton("停止");
		jb4.addActionListener(this);
		
		
		jp1=new JPanel();
		jp1.add(jsp3);;
		jp1.setBorder(new TitledBorder("设备列表"));
		jp2=new JPanel();
		jp2.setLayout(new BorderLayout());
		jp2.setBorder(new TitledBorder("监控日志"));
		jp2.add(jsp1,BorderLayout.CENTER);
		jp2.add(jsp2,BorderLayout.SOUTH);
		jp3=new JPanel();
		jp3.add(jp1,BorderLayout.CENTER);
		jp3.add(jp2,BorderLayout.EAST);
		
		jp4=new JPanel();
		jp4.setBorder(new TitledBorder("操作"));
		FlowLayout l= new FlowLayout();
		l.setHgap(30);
		jp4.setLayout(l);
		jp4.add(jl1);
		jp4.add(jtf1);
		jp4.add(jb1);
		jp4.add(jb2);
		jp4.add(jb3);
		jp4.add(jb4);
		
		this.add(jp3,BorderLayout.CENTER);
		this.add(jp4,BorderLayout.SOUTH);
		
		this.setTitle("统一视频监控");
		this.setIconImage(Variable.iu.getImagePath("ico.jpg"));
		this.pack();
		this.setLocationRelativeTo(null);
		this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); // 设置当关闭窗口时,保证JVM也退出
		this.setVisible(true);
		
		
	}

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值