ui_server.frmScreenShut.java Source code

Java tutorial

Introduction

Here is the source code for ui_server.frmScreenShut.java

Source

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package ui_server;

import Comman.ConnectionServer;
import Comman.KeysVer;
import static Comman.KeysVer.Args;
import Comman.KeysVer.Keys;
import Comman.LOCAL_KEYS;
import Comman.SERVER_KEYS;
import Comman.Tool;
import java.awt.Image;
import java.awt.image.BufferedImage;
import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.IOException;
import java.util.Arrays;
import java.util.HashMap;
import java.util.ResourceBundle;
import javax.imageio.ImageIO;
import javax.swing.ImageIcon;
import javax.swing.JLabel;
import org.apache.commons.net.util.Base64;

/**
 *
 * @author abaza
 */
public class frmScreenShut extends javax.swing.JInternalFrame {

    private static final Comman.Tool Tool = new Tool();
    private static final Comman.KeysVer Keyv = new KeysVer();
    public static ResourceBundle local = Tool.GetLocal();
    public String CUUID, SUUID;
    MainControl MC = null;
    public static int ImageFiled = 0;
    private Object icon;
    public boolean GetImg = false;
    public static ImageIcon ImageBufferArray[] = null;
    public JLabel ImageArray[] = null;
    private GetImage GI = null;
    public SERVER_KEYS Server_Var = new SERVER_KEYS();
    public LOCAL_KEYS Local_Var = new LOCAL_KEYS();

    public frmScreenShut(String sn, MainControl MMC) {
        this.CUUID = sn;
        this.SUUID = Args.get(Keys.SUUID);
        this.MC = MMC;
        initComponents();

        jLabel4.setText(CUUID);
        jLabel3.setText(Tool.getDay() + "  " + Tool.getTime());
        GetImg = true;
        GI = new GetImage();
        GI.init();
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanel1 = new javax.swing.JPanel();
        jLabel2 = new javax.swing.JLabel();
        jLabel1 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        img0 = new javax.swing.JLabel();
        img6 = new javax.swing.JLabel();
        img12 = new javax.swing.JLabel();
        img13 = new javax.swing.JLabel();
        img7 = new javax.swing.JLabel();
        img1 = new javax.swing.JLabel();
        img15 = new javax.swing.JLabel();
        img14 = new javax.swing.JLabel();
        img8 = new javax.swing.JLabel();
        img9 = new javax.swing.JLabel();
        img3 = new javax.swing.JLabel();
        img2 = new javax.swing.JLabel();
        img17 = new javax.swing.JLabel();
        img16 = new javax.swing.JLabel();
        img10 = new javax.swing.JLabel();
        img11 = new javax.swing.JLabel();
        img5 = new javax.swing.JLabel();
        img4 = new javax.swing.JLabel();
        jPanel2 = new javax.swing.JPanel();
        jButton1 = new javax.swing.JButton();
        jButton2 = new javax.swing.JButton();
        jButton3 = new javax.swing.JButton();
        jToggleButton1 = new javax.swing.JToggleButton();

        setClosable(true);
        setIconifiable(true);
        setName(""); // NOI18N
        addInternalFrameListener(new javax.swing.event.InternalFrameListener() {
            public void internalFrameOpened(javax.swing.event.InternalFrameEvent evt) {
            }

            public void internalFrameClosing(javax.swing.event.InternalFrameEvent evt) {
                formInternalFrameClosing(evt);
            }

            public void internalFrameClosed(javax.swing.event.InternalFrameEvent evt) {
            }

            public void internalFrameIconified(javax.swing.event.InternalFrameEvent evt) {
            }

            public void internalFrameDeiconified(javax.swing.event.InternalFrameEvent evt) {
            }

            public void internalFrameActivated(javax.swing.event.InternalFrameEvent evt) {
            }

            public void internalFrameDeactivated(javax.swing.event.InternalFrameEvent evt) {
            }
        });

        jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(""));

        jLabel2.setText("Time \\ Date :");

        jLabel1.setText("Computer Name :");

        jLabel3.setText("00/00/0000 00:00:00");

        jLabel4.setText("....");

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(jPanel1Layout
                .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel1Layout.createSequentialGroup().addContainerGap()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(jLabel2).addComponent(jLabel1))
                        .addGap(59, 59, 59)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(jLabel4, javax.swing.GroupLayout.DEFAULT_SIZE,
                                        javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE,
                                        javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                        .addContainerGap()));
        jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel1Layout.createSequentialGroup().addContainerGap()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(jLabel1).addComponent(jLabel4))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(jLabel2).addComponent(jLabel3))
                        .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));

        img0.setBackground(new java.awt.Color(1, 1, 1));
        img0.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        img0.setText("Image");
        img0.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        img0.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                img0MouseClicked(evt);
            }
        });

        img6.setBackground(new java.awt.Color(1, 1, 1));
        img6.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        img6.setText("Image");
        img6.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        img6.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                img6MouseClicked(evt);
            }
        });

        img12.setBackground(new java.awt.Color(1, 1, 1));
        img12.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        img12.setText("Image");
        img12.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        img12.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                img12MouseClicked(evt);
            }
        });

        img13.setBackground(new java.awt.Color(1, 1, 1));
        img13.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        img13.setText("Image");
        img13.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        img13.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                img13MouseClicked(evt);
            }
        });

        img7.setBackground(new java.awt.Color(1, 1, 1));
        img7.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        img7.setText("Image");
        img7.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        img7.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                img7MouseClicked(evt);
            }
        });

        img1.setBackground(new java.awt.Color(1, 1, 1));
        img1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        img1.setText("Image");
        img1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        img1.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                img1MouseClicked(evt);
            }
        });

        img15.setBackground(new java.awt.Color(1, 1, 1));
        img15.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        img15.setText("Image");
        img15.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        img15.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                img15MouseClicked(evt);
            }
        });

        img14.setBackground(new java.awt.Color(1, 1, 1));
        img14.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        img14.setText("Image");
        img14.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        img14.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                img14MouseClicked(evt);
            }
        });

        img8.setBackground(new java.awt.Color(1, 1, 1));
        img8.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        img8.setText("Image");
        img8.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        img8.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                img8MouseClicked(evt);
            }
        });

        img9.setBackground(new java.awt.Color(1, 1, 1));
        img9.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        img9.setText("Image");
        img9.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        img9.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                img9MouseClicked(evt);
            }
        });

        img3.setBackground(new java.awt.Color(1, 1, 1));
        img3.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        img3.setText("Image");
        img3.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        img3.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                img3MouseClicked(evt);
            }
        });

        img2.setBackground(new java.awt.Color(1, 1, 1));
        img2.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        img2.setText("Image");
        img2.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        img2.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                img2MouseClicked(evt);
            }
        });

        img17.setBackground(new java.awt.Color(1, 1, 1));
        img17.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        img17.setText("Image");
        img17.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        img17.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                img17MouseClicked(evt);
            }
        });

        img16.setBackground(new java.awt.Color(1, 1, 1));
        img16.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        img16.setText("Image");
        img16.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        img16.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                img16MouseClicked(evt);
            }
        });

        img10.setBackground(new java.awt.Color(1, 1, 1));
        img10.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        img10.setText("Image");
        img10.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        img10.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                img10MouseClicked(evt);
            }
        });

        img11.setBackground(new java.awt.Color(1, 1, 1));
        img11.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        img11.setText("Image");
        img11.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        img11.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                img11MouseClicked(evt);
            }
        });

        img5.setBackground(new java.awt.Color(1, 1, 1));
        img5.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        img5.setText("Image");
        img5.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        img5.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                img5MouseClicked(evt);
            }
        });

        img4.setBackground(new java.awt.Color(1, 1, 1));
        img4.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        img4.setText("Image");
        img4.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        img4.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                img4MouseClicked(evt);
            }
        });

        jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(""));

        jButton1.setText(">");
        jButton1.setEnabled(false);
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });

        jButton2.setText("|<");
        jButton2.setEnabled(false);
        jButton2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton2ActionPerformed(evt);
            }
        });

        jButton3.setText(local.getString("btnDownloadAll"));

        jToggleButton1.setText(local.getString("btnSaveafterLoad"));

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout
                .setHorizontalGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(jPanel2Layout.createSequentialGroup()
                                .addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 178,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jToggleButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 267,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
                                        javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 95,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 95,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)));
        jPanel2Layout.setVerticalGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addComponent(jButton2, javax.swing.GroupLayout.DEFAULT_SIZE, 49, Short.MAX_VALUE)
                .addComponent(jButton1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
                        Short.MAX_VALUE)
                .addComponent(jButton3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
                        Short.MAX_VALUE)
                .addComponent(jToggleButton1, javax.swing.GroupLayout.DEFAULT_SIZE,
                        javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE));

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
                        Short.MAX_VALUE)
                .addGroup(layout.createSequentialGroup().addGap(11, 11, 11)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(img0, javax.swing.GroupLayout.PREFERRED_SIZE, 160,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(img6, javax.swing.GroupLayout.PREFERRED_SIZE, 160,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(img12, javax.swing.GroupLayout.PREFERRED_SIZE, 160,
                                        javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(img13, javax.swing.GroupLayout.PREFERRED_SIZE, 160,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(img7, javax.swing.GroupLayout.PREFERRED_SIZE, 160,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(img1, javax.swing.GroupLayout.PREFERRED_SIZE, 160,
                                        javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(img2, javax.swing.GroupLayout.PREFERRED_SIZE, 160,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(img8, javax.swing.GroupLayout.PREFERRED_SIZE, 160,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(img14, javax.swing.GroupLayout.PREFERRED_SIZE, 160,
                                        javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(img15, javax.swing.GroupLayout.PREFERRED_SIZE, 160,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(img9, javax.swing.GroupLayout.PREFERRED_SIZE, 160,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(img3, javax.swing.GroupLayout.PREFERRED_SIZE, 160,
                                        javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(img4, javax.swing.GroupLayout.PREFERRED_SIZE, 160,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(img10, javax.swing.GroupLayout.PREFERRED_SIZE, 160,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(img16, javax.swing.GroupLayout.PREFERRED_SIZE, 160,
                                        javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(img17, javax.swing.GroupLayout.PREFERRED_SIZE, 160,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(img11, javax.swing.GroupLayout.PREFERRED_SIZE, 160,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(img5, javax.swing.GroupLayout.PREFERRED_SIZE, 160,
                                        javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
                        Short.MAX_VALUE));
        layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(layout.createSequentialGroup()
                        .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                        .addGroup(layout
                                                .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                .addGroup(layout.createSequentialGroup()
                                                        .addComponent(img0, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                                160, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                        .addGap(18, 18, 18)
                                                        .addComponent(img6, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                                160, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                        .addGap(18, 18, 18).addComponent(img12,
                                                                javax.swing.GroupLayout.PREFERRED_SIZE, 160,
                                                                javax.swing.GroupLayout.PREFERRED_SIZE))
                                                .addGroup(layout.createSequentialGroup()
                                                        .addComponent(img1, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                                160, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                        .addGap(18, 18, 18)
                                                        .addComponent(img7, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                                160, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                        .addGap(18, 18, 18).addComponent(img13,
                                                                javax.swing.GroupLayout.PREFERRED_SIZE, 160,
                                                                javax.swing.GroupLayout.PREFERRED_SIZE)))
                                        .addGroup(layout
                                                .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                .addGroup(layout.createSequentialGroup()
                                                        .addComponent(img2, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                                160, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                        .addGap(18, 18, 18)
                                                        .addComponent(img8, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                                160, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                        .addGap(18, 18, 18).addComponent(img14,
                                                                javax.swing.GroupLayout.PREFERRED_SIZE, 160,
                                                                javax.swing.GroupLayout.PREFERRED_SIZE))
                                                .addGroup(layout.createSequentialGroup()
                                                        .addComponent(img3, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                                160, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                        .addGap(18, 18, 18)
                                                        .addComponent(img9, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                                160, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                        .addGap(18, 18, 18).addComponent(img15,
                                                                javax.swing.GroupLayout.PREFERRED_SIZE, 160,
                                                                javax.swing.GroupLayout.PREFERRED_SIZE))))
                                .addGroup(layout.createSequentialGroup()
                                        .addComponent(img4, javax.swing.GroupLayout.PREFERRED_SIZE, 160,
                                                javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addGap(18, 18, 18)
                                        .addComponent(img10, javax.swing.GroupLayout.PREFERRED_SIZE, 160,
                                                javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addGap(18, 18, 18).addComponent(img16,
                                                javax.swing.GroupLayout.PREFERRED_SIZE, 160,
                                                javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addGroup(layout.createSequentialGroup()
                                        .addComponent(img5, javax.swing.GroupLayout.PREFERRED_SIZE, 160,
                                                javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addGap(18, 18, 18)
                                        .addComponent(img11, javax.swing.GroupLayout.PREFERRED_SIZE, 160,
                                                javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addGap(18, 18, 18).addComponent(img17,
                                                javax.swing.GroupLayout.PREFERRED_SIZE, 160,
                                                javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(jPanel2,
                                javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE)));

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void formInternalFrameClosing(javax.swing.event.InternalFrameEvent evt) {//GEN-FIRST:event_formInternalFrameClosing
    }//GEN-LAST:event_formInternalFrameClosing

    private void img0MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_img0MouseClicked
        imageImpiliment(img0);
    }//GEN-LAST:event_img0MouseClicked

    private void img1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_img1MouseClicked
        imageImpiliment(img1);
    }//GEN-LAST:event_img1MouseClicked

    private void img2MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_img2MouseClicked
        imageImpiliment(img2);
    }//GEN-LAST:event_img2MouseClicked

    private void img3MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_img3MouseClicked
        imageImpiliment(img3);
    }//GEN-LAST:event_img3MouseClicked

    private void img4MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_img4MouseClicked
        imageImpiliment(img4);
    }//GEN-LAST:event_img4MouseClicked

    private void img5MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_img5MouseClicked
        imageImpiliment(img5);
    }//GEN-LAST:event_img5MouseClicked

    private void img6MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_img6MouseClicked
        imageImpiliment(img6);
    }//GEN-LAST:event_img6MouseClicked

    private void img7MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_img7MouseClicked
        imageImpiliment(img7);
    }//GEN-LAST:event_img7MouseClicked

    private void img8MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_img8MouseClicked
        imageImpiliment(img8);
    }//GEN-LAST:event_img8MouseClicked

    private void img9MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_img9MouseClicked
        imageImpiliment(img9);
    }//GEN-LAST:event_img9MouseClicked

    private void img10MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_img10MouseClicked
        imageImpiliment(img10);
    }//GEN-LAST:event_img10MouseClicked

    private void img11MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_img11MouseClicked
        imageImpiliment(img11);
    }//GEN-LAST:event_img11MouseClicked

    private void img12MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_img12MouseClicked
        imageImpiliment(img12);
    }//GEN-LAST:event_img12MouseClicked

    private void img13MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_img13MouseClicked
        imageImpiliment(img13);
    }//GEN-LAST:event_img13MouseClicked

    private void img14MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_img14MouseClicked
        imageImpiliment(img14);
    }//GEN-LAST:event_img14MouseClicked

    private void img15MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_img15MouseClicked
        imageImpiliment(img15);
    }//GEN-LAST:event_img15MouseClicked

    private void img16MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_img16MouseClicked
        imageImpiliment(img16);
    }//GEN-LAST:event_img16MouseClicked

    private void img17MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_img17MouseClicked
        imageImpiliment(img17);
    }//GEN-LAST:event_img17MouseClicked

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
        GetImg = true;
        GI = new GetImage();
        GI.reset();
        jButton1.setEnabled(false);
        jButton2.setEnabled(true);
    }//GEN-LAST:event_jButton1ActionPerformed

    private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
        for (int i = 0; i <= ImageArray.length - 1; i++) {
            ImageArray[i].setIcon(null);
            ImageArray[i].setIcon(ImageBufferArray[i]);
        }
    }//GEN-LAST:event_jButton2ActionPerformed

    class GetImage extends Thread {

        private Comman.ConnectionServer Server = null;

        public void reset() {
            for (int i = 0; i <= ImageArray.length - 1; i++) {
                ImageArray[i].setIcon(null);
                ImageArray[i].setEnabled(false);
                ImageArray[i].setVisible(false);
            }
            this.start();
        }

        public void init() {
            ImageArray = new JLabel[] { img0, img1, img2, img3, img4, img5, img6, img7, img8, img9, img10, img11,
                    img12, img13, img14, img15, img16, img17 };
            Server = new ConnectionServer();
            for (int i = 0; i <= ImageArray.length - 1; i++) {
                ImageArray[i].setEnabled(false);
                ImageArray[i].setVisible(false);
            }
            String[][] Data = { { Server_Var.TYPE_COMMENT, Server_Var.SC_PRINT_GET },
                    { Local_Var.SCREEN_SUUID, SUUID }, { Local_Var.SCREEN_CUUID, CUUID },
                    { Local_Var.SCREEN_ISDONE, "0" }, { Local_Var.SCREEN_DATE_REC, Tool.getDay() } };
            HashMap<String, String> Ret = Server.Contaner(Data);
            if (Server.DoneOrNot(Ret)) {
                int Size = Ret.size();
                ImageBufferArray = new ImageIcon[Size];
            }
            this.start();
        }

        @Override
        public void run() {
            while (GetImg) {
                jLabel3.setText(Tool.getDay() + "  " + Tool.getTime());
                String[][] Data = { { Server_Var.TYPE_COMMENT, Server_Var.SC_PRINT_GET },
                        { Local_Var.SCREEN_SUUID, SUUID }, { Local_Var.SCREEN_CUUID, CUUID },
                        { Local_Var.SCREEN_ISDONE, "0" }, { Local_Var.SCREEN_DATE_REC, Tool.getDay() } };
                HashMap<String, String> Ret = Server.Contaner(Data);
                if (Server.DoneOrNot(Ret)) {
                    for (int i = 0; i <= Ret.size() - 1; i++) {
                        try {
                            String ImageData = Ret.get(String.valueOf(i));
                            if (ImageData != null) {
                                byte[] newBytes = Tool.Image_decompress(ImageData.getBytes());
                                BufferedImage img = ImageIO.read(new ByteArrayInputStream(newBytes));
                                ImageBufferArray[ImageFiled] = new ImageIcon(img);
                                ImageArray[i].setIcon(ImageBufferArray[ImageFiled]);
                                Thread.sleep(300);
                            }
                        } catch (IOException | InterruptedException ex) {
                        }
                    }
                }
            }
        }
    }

    private void imageImpiliment(JLabel img) {
        ImageIcon IIC = (ImageIcon) img.getIcon();
        Image image = IIC.getImage();
        BufferedImage buffered = (BufferedImage) image;
        try {
            File outputfile = new File("saved.png");
            ImageIO.write(buffered, "png", outputfile);
        } catch (IOException e) {
        }
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel img0;
    private javax.swing.JLabel img1;
    private javax.swing.JLabel img10;
    private javax.swing.JLabel img11;
    private javax.swing.JLabel img12;
    private javax.swing.JLabel img13;
    private javax.swing.JLabel img14;
    private javax.swing.JLabel img15;
    private javax.swing.JLabel img16;
    private javax.swing.JLabel img17;
    private javax.swing.JLabel img2;
    private javax.swing.JLabel img3;
    private javax.swing.JLabel img4;
    private javax.swing.JLabel img5;
    private javax.swing.JLabel img6;
    private javax.swing.JLabel img7;
    private javax.swing.JLabel img8;
    private javax.swing.JLabel img9;
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton2;
    private javax.swing.JButton jButton3;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JToggleButton jToggleButton1;
    // End of variables declaration//GEN-END:variables
}