import javax.swing.*;
import java.awt.*;
import javax.swing.border.*;

public class panelDlSuccess extends JPanel{
  JLabel lblGreat;
  JLabel lblSuccessfulMsg ;
  JLabel lblContinueMsg ;
  JButton btnYes ;
  JButton btnNo ;

  public panelDlSuccess() {
    lblGreat = new JLabel();
    lblGreat.setText("Great ! ");
    lblGreat.setFont(new Font("Avenir Next", 0, 50));

    lblSuccessfulMsg = new JLabel();
    lblSuccessfulMsg.setText("You have successfully downloaded.");
    lblSuccessfulMsg.setFont(new Font("Avenir Next", 0, 20));

    lblContinueMsg = new JLabel();
    lblContinueMsg.setText("Do you want to continue ? ");
    lblContinueMsg.setFont(new Font("Avenir Next", 0, 20));

    btnYes = new JButton();
    btnYes.setText("YES");
    btnYes.setFont(new Font("Avenir Next", 1, 14));
    btnYes.setCursor(new Cursor(Cursor.HAND_CURSOR));
    btnYes.addActionListener(
      new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent eventBtnYes)
          {btnYesActionPerformed(eventBtnYes);}
      });

    btnNo = new JButton();
    btnNo.setText("NO");
    btnNo.setFont(new Font("Avenir Next", 1, 14));
    btnNo.setCursor(new Cursor(Cursor.HAND_CURSOR));
    btnNo.addActionListener(
      new java.awt.event.ActionListener(){
        public void actionPerformed(java.awt.event.ActionEvent eventBtnNo)
        {btnNoActionPerformed(eventBtnNo);}
      });

    add(lblGreat);
    add(lblSuccessfulMsg);
    add(lblContinueMsg);
    add(btnYes);
    add(btnNo);

    GroupLayout glDlSuccess = new GroupLayout(this);
    glDlSuccess.setAutoCreateContainerGaps(true);
    glDlSuccess.setHorizontalGroup(
      glDlSuccess.createSequentialGroup()
      .addGap(206,206,206)
      .addGroup(
          glDlSuccess.createParallelGroup(GroupLayout.Alignment.LEADING)
          .addGroup(
            glDlSuccess.createSequentialGroup()
            .addGap(100,100,100)
            .addComponent(lblGreat))
          .addGroup(
            glDlSuccess.createSequentialGroup()
            .addGap(20,20,20)
            .addComponent(lblSuccessfulMsg))
          .addGroup(
            glDlSuccess.createSequentialGroup()
            .addGap(60,60,60)
            .addComponent(lblContinueMsg))
          .addGroup(
            glDlSuccess.createSequentialGroup()
            .addGap(60,60,60)
            .addComponent(btnYes, GroupLayout.PREFERRED_SIZE, 120,GroupLayout.PREFERRED_SIZE)
            .addComponent(btnNo, GroupLayout.PREFERRED_SIZE, 120,GroupLayout.PREFERRED_SIZE)
          ))
    ); //end of setHorizontalGroup

    glDlSuccess.setVerticalGroup(
      glDlSuccess.createSequentialGroup()
      .addGap(90, 90, 90)
      .addComponent(lblGreat)
      .addGap(40, 40, 40)
      .addComponent(lblSuccessfulMsg)
      .addGap(60, 60, 60)
      .addComponent(lblContinueMsg)
      .addGap(30, 30, 30)
      .addGroup(
        glDlSuccess.createParallelGroup(GroupLayout.Alignment.BASELINE)
        .addComponent(btnYes, GroupLayout.PREFERRED_SIZE, 40,GroupLayout.PREFERRED_SIZE)
        .addComponent(btnNo, GroupLayout.PREFERRED_SIZE, 40,GroupLayout.PREFERRED_SIZE)
      )); //end of setVerticalGroup
    setLayout(glDlSuccess);
    setVisible(true);
    setBackground(Color.decode("#FFFFFF"));
  } //end of panelDlSuccess's constructor

  private void btnYesActionPerformed(java.awt.event.ActionEvent eventBtnYes){
    //Write the code for Yes button. Perform action proceed to panelResources. 
  }
  private void btnNoActionPerformed(java.awt.event.ActionEvent eventBtnNo){
    ImageIcon bye = new ImageIcon(panelDlSuccess.class.getResource("/bye.png"));
    JOptionPane.showMessageDialog(null, "\n GOOD LUCK ! \n \n \t BYE! \n", "Exit", JOptionPane.INFORMATION_MESSAGE, bye);
    System.exit(0);
  }

}

@@ -243,24 +243,373 @@
 Success() %7B%0A
+    if (vkClient.fromServer.equalsIgnoreCase(vkClient.errorMessage%5B0%5D) %7C%7C vkClient.fromServer.equalsIgnoreCase(vkClient.errorMessage%5B1%5D) %7C%7C vkClient.fromServer.equalsIgnoreCase(vkClient.errorMessage%5B2%5D))%7B%0A      JOptionPane.showMessageDialog(null, vkClient.fromServer, %22Server message%22, JOptionPane.INFORMATION_MESSAGE);%0A      System.exit(1);%0A    %7D%0A%0A
     lblGreat
@@ -2745,33 +2745,33 @@
 REFERRED_SIZE, 1
-2
+0
 0,GroupLayout.PR
@@ -2776,32 +2776,62 @@
 PREFERRED_SIZE)%0A
+            .addGap(10,10,10)%0A
             .add
@@ -2876,17 +2876,17 @@
 _SIZE, 1
-2
+0
 0,GroupL
@@ -3835,17 +3835,49 @@
 sources.
- 
+%0A    vkClient.sendUserInput(1,4);
 %0A  %7D%0A  p
@@ -3949,16 +3949,49 @@
 BtnNo)%7B%0A
+    vkClient.sendUserInput(0,4);%0A
     Imag
@@ -4107,48 +4107,44 @@
 ll, 
-%22%5Cn GOOD LUCK ! %5Cn %5Cn %5Ct BYE! %5Cn%22, %22Exit
+vkClient.fromServer, %22Server message
 %22, J
@@ -4174,17 +4174,16 @@
 MESSAGE,
- 
 bye);%0A  

Version 3