evgeniyosipov

JLChatView.java

Dec 27th, 2014
236
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 29.34 KB | None | 0 0
  1. import com.fastandclever.application.jlchat.controller.JLChatController;
  2. import com.fastandclever.application.jlchat.model.JLChatModel;
  3. import java.io.IOException;
  4. import java.util.logging.Level;
  5. import java.util.logging.Logger;
  6. import javax.swing.JOptionPane;
  7.  
  8. public class JLChatView extends javax.swing.JFrame {
  9.  
  10.     /**
  11.      * Creates new form JLChat
  12.      */
  13.     public JLChatView() {
  14.         initComponents();
  15.     }
  16.  
  17.     /**
  18.      * This method is called from within the constructor to initialize the form.
  19.      * WARNING: Do NOT modify this code. The content of this method is always
  20.      * regenerated by the Form Editor.
  21.      */
  22.     @SuppressWarnings("unchecked")
  23.     // <editor-fold defaultstate="collapsed" desc="Generated Code">                          
  24.     private void initComponents() {
  25.  
  26.         buttonGroup1 = new javax.swing.ButtonGroup();
  27.         jTextField1 = new javax.swing.JTextField();
  28.         jLabel1 = new javax.swing.JLabel();
  29.         jTextField2 = new javax.swing.JTextField();
  30.         jLabel2 = new javax.swing.JLabel();
  31.         jTextField3 = new javax.swing.JTextField();
  32.         jLabel3 = new javax.swing.JLabel();
  33.         jScrollPane1 = new javax.swing.JScrollPane();
  34.         jTextArea1 = new javax.swing.JTextArea();
  35.         jButton3 = new javax.swing.JButton();
  36.         jScrollPane2 = new javax.swing.JScrollPane();
  37.         jTextArea2 = new javax.swing.JTextArea();
  38.         jScrollPane3 = new javax.swing.JScrollPane();
  39.         jTextArea3 = new javax.swing.JTextArea();
  40.         jRadioButton1 = new javax.swing.JRadioButton();
  41.         jRadioButton2 = new javax.swing.JRadioButton();
  42.         jLabel4 = new javax.swing.JLabel();
  43.         jButton1 = new javax.swing.JButton();
  44.         jButton2 = new javax.swing.JButton();
  45.         jMenuBar1 = new javax.swing.JMenuBar();
  46.         jMenu1 = new javax.swing.JMenu();
  47.         jMenuItem1 = new javax.swing.JMenuItem();
  48.         jMenu2 = new javax.swing.JMenu();
  49.         jMenuItem3 = new javax.swing.JMenuItem();
  50.  
  51.         setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
  52.         setTitle("JLChat");
  53.  
  54.         jTextField1.setText("admin");
  55.  
  56.         jLabel1.setFont(new java.awt.Font("SansSerif", 0, 10)); // NOI18N
  57.         jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
  58.         jLabel1.setText("Your Name");
  59.  
  60.         jTextField2.setText("localhost");
  61.  
  62.         jLabel2.setFont(new java.awt.Font("SansSerif", 0, 10)); // NOI18N
  63.         jLabel2.setText("Server's IP");
  64.  
  65.         jTextField3.setText("1777");
  66.  
  67.         jLabel3.setFont(new java.awt.Font("SansSerif", 0, 10)); // NOI18N
  68.         jLabel3.setText("Server's Port");
  69.  
  70.         jTextArea1.setEditable(false);
  71.         jTextArea1.setColumns(20);
  72.         jTextArea1.setLineWrap(true);
  73.         jTextArea1.setRows(5);
  74.         jTextArea1.setWrapStyleWord(true);
  75.         jTextArea1.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
  76.         jScrollPane1.setViewportView(jTextArea1);
  77.  
  78.         jButton3.setText("Send");
  79.         jButton3.setToolTipText("");
  80.         jButton3.setEnabled(false);
  81.         jButton3.addActionListener(new java.awt.event.ActionListener() {
  82.             public void actionPerformed(java.awt.event.ActionEvent evt) {
  83.                 jButton3ActionPerformed(evt);
  84.             }
  85.         });
  86.  
  87.         jTextArea2.setColumns(20);
  88.         jTextArea2.setFont(new java.awt.Font("Serif", 0, 12)); // NOI18N
  89.         jTextArea2.setLineWrap(true);
  90.         jTextArea2.setRows(5);
  91.         jTextArea2.setWrapStyleWord(true);
  92.         jTextArea2.setEnabled(false);
  93.         jScrollPane2.setViewportView(jTextArea2);
  94.  
  95.         jTextArea3.setEditable(false);
  96.         jTextArea3.setColumns(20);
  97.         jTextArea3.setFont(new java.awt.Font("SansSerif", 0, 12)); // NOI18N
  98.         jTextArea3.setLineWrap(true);
  99.         jTextArea3.setRows(5);
  100.         jTextArea3.setText("Instructions:\n\n1) Create a server (you can just click the \"Connect\")\n\n2) Connect to the server (only one client can connect to the server):\n\na) Enter in the \"Your Name\" you name\nb) Enter in the \"IP Server\" host's address (for example, 192.168.0.111)\nc) Enter in the \"Server Port\" host's port\nd) Choose \"Client\" in \"Connect as\"\ne) Press the \"Connect\"\n\n3) Chat =)\n\n4) Uncouple connection to both sides and then repeat steps 1-3 to restore the connection\n\nPleasant conversation!");
  101.         jTextArea3.setWrapStyleWord(true);
  102.         jScrollPane3.setViewportView(jTextArea3);
  103.  
  104.         buttonGroup1.add(jRadioButton1);
  105.         jRadioButton1.setFont(new java.awt.Font("SansSerif", 0, 12)); // NOI18N
  106.         jRadioButton1.setSelected(true);
  107.         jRadioButton1.setText("Server");
  108.  
  109.         buttonGroup1.add(jRadioButton2);
  110.         jRadioButton2.setFont(new java.awt.Font("SansSerif", 0, 12)); // NOI18N
  111.         jRadioButton2.setText("Client");
  112.  
  113.         jLabel4.setFont(new java.awt.Font("SansSerif", 0, 10)); // NOI18N
  114.         jLabel4.setText("Connect as");
  115.  
  116.         jButton1.setText("Connect");
  117.         jButton1.addActionListener(new java.awt.event.ActionListener() {
  118.             public void actionPerformed(java.awt.event.ActionEvent evt) {
  119.                 jButton1ActionPerformed(evt);
  120.             }
  121.         });
  122.  
  123.         jButton2.setText("Disconnect");
  124.         jButton2.setEnabled(false);
  125.         jButton2.addActionListener(new java.awt.event.ActionListener() {
  126.             public void actionPerformed(java.awt.event.ActionEvent evt) {
  127.                 jButton2ActionPerformed(evt);
  128.             }
  129.         });
  130.  
  131.         jMenu1.setText("File");
  132.  
  133.         jMenuItem1.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F4, java.awt.event.InputEvent.ALT_MASK));
  134.         jMenuItem1.setText("Exit");
  135.         jMenuItem1.addActionListener(new java.awt.event.ActionListener() {
  136.             public void actionPerformed(java.awt.event.ActionEvent evt) {
  137.                 jMenuItem1ActionPerformed(evt);
  138.             }
  139.         });
  140.         jMenu1.add(jMenuItem1);
  141.  
  142.         jMenuBar1.add(jMenu1);
  143.  
  144.         jMenu2.setText("Information");
  145.  
  146.         jMenuItem3.setText("About");
  147.         jMenuItem3.addActionListener(new java.awt.event.ActionListener() {
  148.             public void actionPerformed(java.awt.event.ActionEvent evt) {
  149.                 jMenuItem3ActionPerformed(evt);
  150.             }
  151.         });
  152.         jMenu2.add(jMenuItem3);
  153.  
  154.         jMenuBar1.add(jMenu2);
  155.  
  156.         setJMenuBar(jMenuBar1);
  157.  
  158.         javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
  159.         getContentPane().setLayout(layout);
  160.         layout.setHorizontalGroup(
  161.             layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  162.             .addGroup(layout.createSequentialGroup()
  163.                 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
  164.                     .addGroup(layout.createSequentialGroup()
  165.                         .addGap(4, 4, 4)
  166.                         .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
  167.                             .addComponent(jLabel2)
  168.                             .addComponent(jLabel3)
  169.                             .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 62, javax.swing.GroupLayout.PREFERRED_SIZE)
  170.                             .addComponent(jLabel4))
  171.                         .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  172.                             .addGroup(layout.createSequentialGroup()
  173.                                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  174.                                 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
  175.                                     .addComponent(jTextField2, javax.swing.GroupLayout.Alignment.LEADING)
  176.                                     .addComponent(jTextField1, javax.swing.GroupLayout.Alignment.LEADING)
  177.                                     .addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE)))
  178.                             .addGroup(layout.createSequentialGroup()
  179.                                 .addGap(37, 37, 37)
  180.                                 .addComponent(jRadioButton1)
  181.                                 .addGap(18, 18, 18)
  182.                                 .addComponent(jRadioButton2))))
  183.                     .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 281, javax.swing.GroupLayout.PREFERRED_SIZE)
  184.                     .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
  185.                         .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 130, javax.swing.GroupLayout.PREFERRED_SIZE)
  186.                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
  187.                         .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 130, javax.swing.GroupLayout.PREFERRED_SIZE)))
  188.                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  189.                 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  190.                     .addGroup(layout.createSequentialGroup()
  191.                         .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 447, Short.MAX_VALUE)
  192.                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  193.                         .addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 101, javax.swing.GroupLayout.PREFERRED_SIZE))
  194.                     .addComponent(jScrollPane1)))
  195.         );
  196.         layout.setVerticalGroup(
  197.             layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  198.             .addGroup(layout.createSequentialGroup()
  199.                 .addContainerGap()
  200.                 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  201.                     .addGroup(layout.createSequentialGroup()
  202.                         .addComponent(jScrollPane1)
  203.                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  204.                         .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  205.                             .addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)
  206.                             .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
  207.                     .addGroup(layout.createSequentialGroup()
  208.                         .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
  209.                             .addComponent(jTextField1)
  210.                             .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
  211.                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  212.                         .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
  213.                             .addComponent(jTextField2)
  214.                             .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
  215.                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  216.                         .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
  217.                             .addComponent(jTextField3)
  218.                             .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
  219.                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  220.                         .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
  221.                             .addComponent(jRadioButton2)
  222.                             .addComponent(jLabel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
  223.                             .addComponent(jRadioButton1))
  224.                         .addGap(6, 6, 6)
  225.                         .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
  226.                             .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)
  227.                             .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE))
  228.                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  229.                         .addComponent(jScrollPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 255, Short.MAX_VALUE)))
  230.                 .addContainerGap())
  231.         );
  232.  
  233.         pack();
  234.     }// </editor-fold>                        
  235.  
  236.     private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {                                        
  237.         getjButton1().setEnabled(false);
  238.         getjButton2().setEnabled(true);
  239.  
  240.         getjRadioButton1().setEnabled(false);
  241.         getjRadioButton2().setEnabled(false);
  242.  
  243.         getjTextField1().setEnabled(false);
  244.         getjTextField2().setEnabled(false);
  245.         getjTextField3().setEnabled(false);
  246.  
  247.         JLChatModel.setUserName(getjTextField1().getText());
  248.         JLChatModel.setServerIP(getjTextField2().getText());
  249.         JLChatModel.setServerPort(Integer.parseInt(getjTextField3().getText()));
  250.  
  251.         JLChatModel.setBegin(true);
  252.         JLChatModel.setConnect(false);
  253.  
  254.     }                                        
  255.  
  256.     private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {                                        
  257.         getjButton1().setEnabled(true);
  258.         getjButton2().setEnabled(false);
  259.         getjButton3().setEnabled(false);
  260.  
  261.         getjRadioButton1().setEnabled(true);
  262.         getjRadioButton2().setEnabled(true);
  263.  
  264.         getjTextField1().setEnabled(true);
  265.         getjTextField2().setEnabled(true);
  266.         getjTextField3().setEnabled(true);
  267.  
  268.         getjTextArea2().setEnabled(false);
  269.  
  270.         JLChatModel.setBegin(false);
  271.         JLChatModel.setConnect(false);
  272.  
  273.         if (getjRadioButton1().isSelected()) {
  274.             try {
  275.                 if (JLChatModel.getBr() != null && JLChatModel.getBw() != null) {
  276.                     JLChatModel.getBr().close();
  277.                     JLChatModel.getBw().flush();
  278.                     JLChatModel.getBw().close();
  279.                 }
  280.                 if (JLChatModel.getSocket() != null) {
  281.                     JLChatModel.getSocket().close();
  282.                 }
  283.  
  284.                 JLChatModel.getServerSocket().close();
  285.  
  286.                 JLChatModel.setBr(null);
  287.                 JLChatModel.setBw(null);
  288.                 JLChatModel.setSocket(null);
  289.                 JLChatModel.setServerSocket(null);
  290.             } catch (IOException ex) {
  291.                 Logger.getLogger(JLChatView.class.getName()).log(Level.SEVERE, null, ex);
  292.             }
  293.         } else {
  294.             try {
  295.                 if (JLChatModel.getBr() != null && JLChatModel.getBw() != null) {
  296.                     JLChatModel.getBr().close();
  297.                     JLChatModel.getBw().flush();
  298.                     JLChatModel.getBw().close();
  299.                 }
  300.                 if (JLChatModel.getSocket() != null) {
  301.                     JLChatModel.getSocket().close();
  302.                 }
  303.  
  304.                 JLChatModel.setBr(null);
  305.                 JLChatModel.setBw(null);
  306.                 JLChatModel.setSocket(null);
  307.             } catch (IOException ex) {
  308.                 Logger.getLogger(JLChatView.class.getName()).log(Level.SEVERE, null, ex);
  309.             }
  310.  
  311.         }
  312.     }                                        
  313.  
  314.     private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {                                        
  315.         JLChatModel.setSafeChatString(getjTextArea2().getText());
  316.         JLChatController.sendMessageMethod(JLChatModel.getSafeChatString());
  317.     }                                        
  318.  
  319.     private void jMenuItem3ActionPerformed(java.awt.event.ActionEvent evt) {                                          
  320.         JOptionPane.showConfirmDialog(
  321.                 null,
  322.                 "JLChat v1.5 \n"
  323.                 + "Evgeniy Osipov, 2012-2013 \n"
  324.                 + "[email protected], http://fastandclever.ru \n\n"
  325.                 + "GNU GPL \n"
  326.                 + "This program is free software; you can redistribute it and/or \n"
  327.                 + "modify it under the terms of the GNU General Public \n"
  328.                 + "License as published by the Free Software Foundation;\n"
  329.                 + "either version 2 of the License, or (at your option) any later version. \n"
  330.                 + "This program is distributed in the hope that it will be useful, \n"
  331.                 + "but WITHOUT ANY WARRANTY; without even the implied \n"
  332.                 + "warranty of MERCHANTABILITY or FITNESS FOR A \n"
  333.                 + "PARTICULAR PURPOSE.  See the GNU General Public \n"
  334.                 + "License for more details. \n"
  335.                 + "You should have received a copy of the GNU General \n"
  336.                 + "Public License along with this program; if not, write to the \n"
  337.                 + "Free Software Foundation, Inc., 675 Mass Ave, \n"
  338.                 + "Cambridge, MA 02139, USA.",
  339.                 "About", JOptionPane.PLAIN_MESSAGE,
  340.                 JOptionPane.PLAIN_MESSAGE);
  341.     }                                          
  342.  
  343.     private void jMenuItem1ActionPerformed(java.awt.event.ActionEvent evt) {                                          
  344.         System.exit(0);
  345.     }                                          
  346.  
  347.     /**
  348.      * @param args the command line arguments
  349.      */
  350.     public static void main(String args[]) {
  351.         /* Set the Nimbus look and feel */
  352.         //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
  353.         /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
  354.          * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
  355.          */
  356.         try {
  357.             for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
  358.                 if ("Nimbus".equals(info.getName())) {
  359.                     javax.swing.UIManager.setLookAndFeel(info.getClassName());
  360.                     break;
  361.                 }
  362.             }
  363.         } catch (ClassNotFoundException ex) {
  364.             java.util.logging.Logger.getLogger(JLChatView.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
  365.         } catch (InstantiationException ex) {
  366.             java.util.logging.Logger.getLogger(JLChatView.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
  367.         } catch (IllegalAccessException ex) {
  368.             java.util.logging.Logger.getLogger(JLChatView.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
  369.         } catch (javax.swing.UnsupportedLookAndFeelException ex) {
  370.             java.util.logging.Logger.getLogger(JLChatView.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
  371.         }
  372.         //</editor-fold>
  373.  
  374.         /* Create and display the form */
  375.         JLChatView jlch = new JLChatView();
  376.         jlch.setVisible(true);
  377.  
  378.         while (true) {
  379.             try {
  380.                 Thread.sleep(100);
  381.             } catch (InterruptedException ex) {
  382.                 Logger.getLogger(JLChatView.class.getName()).log(Level.SEVERE, null, ex);
  383.             }
  384.  
  385.             if (JLChatModel.isBegin()) {
  386.  
  387.                 if (getjRadioButton1().isSelected()) {
  388.                     JLChatController.startServerSockets();
  389.  
  390.                 } else if (getjRadioButton2().isSelected()) {
  391.                     JLChatController.startClientSockets();
  392.  
  393.                 }
  394.             }
  395.  
  396.             if (JLChatModel.isConnect()) {
  397.                 try {
  398.                     if (JLChatModel.getSendMessage().length() != 0) {
  399.                         JLChatController.sendMessageSafe();
  400.                     }
  401.  
  402.                     if (JLChatModel.getBr().ready()) {
  403.                         JLChatController.chatMessageSafe();
  404.                     }
  405.  
  406.                 } catch (IOException ex) {
  407.                     Logger.getLogger(JLChatView.class.getName()).log(Level.SEVERE, null, ex);
  408.                 }
  409.             }
  410.  
  411.         }
  412.  
  413.     }
  414.  
  415.     /**
  416.      * @return the buttonGroup1
  417.      */
  418.     public static javax.swing.ButtonGroup getButtonGroup1() {
  419.         return buttonGroup1;
  420.     }
  421.  
  422.     /**
  423.      * @param aButtonGroup1 the buttonGroup1 to set
  424.      */
  425.     public static void setButtonGroup1(javax.swing.ButtonGroup aButtonGroup1) {
  426.         buttonGroup1 = aButtonGroup1;
  427.     }
  428.  
  429.     /**
  430.      * @return the jButton1
  431.      */
  432.     public static javax.swing.JButton getjButton1() {
  433.         return jButton1;
  434.     }
  435.  
  436.     /**
  437.      * @param ajButton1 the jButton1 to set
  438.      */
  439.     public static void setjButton1(javax.swing.JButton ajButton1) {
  440.         jButton1 = ajButton1;
  441.     }
  442.  
  443.     /**
  444.      * @return the jButton2
  445.      */
  446.     public static javax.swing.JButton getjButton2() {
  447.         return jButton2;
  448.     }
  449.  
  450.     /**
  451.      * @param ajButton2 the jButton2 to set
  452.      */
  453.     public static void setjButton2(javax.swing.JButton ajButton2) {
  454.         jButton2 = ajButton2;
  455.     }
  456.  
  457.     /**
  458.      * @return the jButton3
  459.      */
  460.     public static javax.swing.JButton getjButton3() {
  461.         return jButton3;
  462.     }
  463.  
  464.     /**
  465.      * @param ajButton3 the jButton3 to set
  466.      */
  467.     public static void setjButton3(javax.swing.JButton ajButton3) {
  468.         jButton3 = ajButton3;
  469.     }
  470.  
  471.     /**
  472.      * @return the jLabel1
  473.      */
  474.     public static javax.swing.JLabel getjLabel1() {
  475.         return jLabel1;
  476.     }
  477.  
  478.     /**
  479.      * @param ajLabel1 the jLabel1 to set
  480.      */
  481.     public static void setjLabel1(javax.swing.JLabel ajLabel1) {
  482.         jLabel1 = ajLabel1;
  483.     }
  484.  
  485.     /**
  486.      * @return the jLabel2
  487.      */
  488.     public static javax.swing.JLabel getjLabel2() {
  489.         return jLabel2;
  490.     }
  491.  
  492.     /**
  493.      * @param ajLabel2 the jLabel2 to set
  494.      */
  495.     public static void setjLabel2(javax.swing.JLabel ajLabel2) {
  496.         jLabel2 = ajLabel2;
  497.     }
  498.  
  499.     /**
  500.      * @return the jLabel3
  501.      */
  502.     public static javax.swing.JLabel getjLabel3() {
  503.         return jLabel3;
  504.     }
  505.  
  506.     /**
  507.      * @param ajLabel3 the jLabel3 to set
  508.      */
  509.     public static void setjLabel3(javax.swing.JLabel ajLabel3) {
  510.         jLabel3 = ajLabel3;
  511.     }
  512.  
  513.     /**
  514.      * @return the jLabel4
  515.      */
  516.     public static javax.swing.JLabel getjLabel4() {
  517.         return jLabel4;
  518.     }
  519.  
  520.     /**
  521.      * @param ajLabel4 the jLabel4 to set
  522.      */
  523.     public static void setjLabel4(javax.swing.JLabel ajLabel4) {
  524.         jLabel4 = ajLabel4;
  525.     }
  526.  
  527.     /**
  528.      * @return the jMenu1
  529.      */
  530.     public javax.swing.JMenu getjMenu1() {
  531.         return jMenu1;
  532.     }
  533.  
  534.     /**
  535.      * @param jMenu1 the jMenu1 to set
  536.      */
  537.     public void setjMenu1(javax.swing.JMenu jMenu1) {
  538.         this.jMenu1 = jMenu1;
  539.     }
  540.  
  541.     /**
  542.      * @return the jMenu2
  543.      */
  544.     public javax.swing.JMenu getjMenu2() {
  545.         return jMenu2;
  546.     }
  547.  
  548.     /**
  549.      * @param jMenu2 the jMenu2 to set
  550.      */
  551.     public void setjMenu2(javax.swing.JMenu jMenu2) {
  552.         this.jMenu2 = jMenu2;
  553.     }
  554.  
  555.     /**
  556.      * @return the jMenuBar1
  557.      */
  558.     public static javax.swing.JMenuBar getjMenuBar1() {
  559.         return jMenuBar1;
  560.     }
  561.  
  562.     /**
  563.      * @param ajMenuBar1 the jMenuBar1 to set
  564.      */
  565.     public static void setjMenuBar1(javax.swing.JMenuBar ajMenuBar1) {
  566.         jMenuBar1 = ajMenuBar1;
  567.     }
  568.  
  569.     /**
  570.      * @return the jMenuItem1
  571.      */
  572.     public javax.swing.JMenuItem getjMenuItem1() {
  573.         return jMenuItem1;
  574.     }
  575.  
  576.     /**
  577.      * @param jMenuItem1 the jMenuItem1 to set
  578.      */
  579.     public void setjMenuItem1(javax.swing.JMenuItem jMenuItem1) {
  580.         this.jMenuItem1 = jMenuItem1;
  581.     }
  582.  
  583.     /**
  584.      * @return the jMenuItem3
  585.      */
  586.     public javax.swing.JMenuItem getjMenuItem3() {
  587.         return jMenuItem3;
  588.     }
  589.  
  590.     /**
  591.      * @param jMenuItem3 the jMenuItem3 to set
  592.      */
  593.     public void setjMenuItem3(javax.swing.JMenuItem jMenuItem3) {
  594.         this.jMenuItem3 = jMenuItem3;
  595.     }
  596.  
  597.     /**
  598.      * @return the jRadioButton1
  599.      */
  600.     public static javax.swing.JRadioButton getjRadioButton1() {
  601.         return jRadioButton1;
  602.     }
  603.  
  604.     /**
  605.      * @param ajRadioButton1 the jRadioButton1 to set
  606.      */
  607.     public static void setjRadioButton1(javax.swing.JRadioButton ajRadioButton1) {
  608.         jRadioButton1 = ajRadioButton1;
  609.     }
  610.  
  611.     /**
  612.      * @return the jRadioButton2
  613.      */
  614.     public static javax.swing.JRadioButton getjRadioButton2() {
  615.         return jRadioButton2;
  616.     }
  617.  
  618.     /**
  619.      * @param ajRadioButton2 the jRadioButton2 to set
  620.      */
  621.     public static void setjRadioButton2(javax.swing.JRadioButton ajRadioButton2) {
  622.         jRadioButton2 = ajRadioButton2;
  623.     }
  624.  
  625.     /**
  626.      * @return the jScrollPane1
  627.      */
  628.     public static javax.swing.JScrollPane getjScrollPane1() {
  629.         return jScrollPane1;
  630.     }
  631.  
  632.     /**
  633.      * @param ajScrollPane1 the jScrollPane1 to set
  634.      */
  635.     public static void setjScrollPane1(javax.swing.JScrollPane ajScrollPane1) {
  636.         jScrollPane1 = ajScrollPane1;
  637.     }
  638.  
  639.     /**
  640.      * @return the jScrollPane2
  641.      */
  642.     public static javax.swing.JScrollPane getjScrollPane2() {
  643.         return jScrollPane2;
  644.     }
  645.  
  646.     /**
  647.      * @param ajScrollPane2 the jScrollPane2 to set
  648.      */
  649.     public static void setjScrollPane2(javax.swing.JScrollPane ajScrollPane2) {
  650.         jScrollPane2 = ajScrollPane2;
  651.     }
  652.  
  653.     /**
  654.      * @return the jScrollPane3
  655.      */
  656.     public static javax.swing.JScrollPane getjScrollPane3() {
  657.         return jScrollPane3;
  658.     }
  659.  
  660.     /**
  661.      * @param ajScrollPane3 the jScrollPane3 to set
  662.      */
  663.     public static void setjScrollPane3(javax.swing.JScrollPane ajScrollPane3) {
  664.         jScrollPane3 = ajScrollPane3;
  665.     }
  666.  
  667.     /**
  668.      * @return the jTextArea1
  669.      */
  670.     public static javax.swing.JTextArea getjTextArea1() {
  671.         return jTextArea1;
  672.     }
  673.  
  674.     /**
  675.      * @param ajTextArea1 the jTextArea1 to set
  676.      */
  677.     public static void setjTextArea1(javax.swing.JTextArea ajTextArea1) {
  678.         jTextArea1 = ajTextArea1;
  679.     }
  680.  
  681.     /**
  682.      * @return the jTextArea2
  683.      */
  684.     public static javax.swing.JTextArea getjTextArea2() {
  685.         return jTextArea2;
  686.     }
  687.  
  688.     /**
  689.      * @param ajTextArea2 the jTextArea2 to set
  690.      */
  691.     public static void setjTextArea2(javax.swing.JTextArea ajTextArea2) {
  692.         jTextArea2 = ajTextArea2;
  693.     }
  694.  
  695.     /**
  696.      * @return the jTextArea3
  697.      */
  698.     public static javax.swing.JTextArea getjTextArea3() {
  699.         return jTextArea3;
  700.     }
  701.  
  702.     /**
  703.      * @param ajTextArea3 the jTextArea3 to set
  704.      */
  705.     public static void setjTextArea3(javax.swing.JTextArea ajTextArea3) {
  706.         jTextArea3 = ajTextArea3;
  707.     }
  708.  
  709.     /**
  710.      * @return the jTextField1
  711.      */
  712.     public static javax.swing.JTextField getjTextField1() {
  713.         return jTextField1;
  714.     }
  715.  
  716.     /**
  717.      * @param ajTextField1 the jTextField1 to set
  718.      */
  719.     public static void setjTextField1(javax.swing.JTextField ajTextField1) {
  720.         jTextField1 = ajTextField1;
  721.     }
  722.  
  723.     /**
  724.      * @return the jTextField2
  725.      */
  726.     public static javax.swing.JTextField getjTextField2() {
  727.         return jTextField2;
  728.     }
  729.  
  730.     /**
  731.      * @param ajTextField2 the jTextField2 to set
  732.      */
  733.     public static void setjTextField2(javax.swing.JTextField ajTextField2) {
  734.         jTextField2 = ajTextField2;
  735.     }
  736.  
  737.     /**
  738.      * @return the jTextField3
  739.      */
  740.     public static javax.swing.JTextField getjTextField3() {
  741.         return jTextField3;
  742.     }
  743.  
  744.     /**
  745.      * @param ajTextField3 the jTextField3 to set
  746.      */
  747.     public static void setjTextField3(javax.swing.JTextField ajTextField3) {
  748.         jTextField3 = ajTextField3;
  749.     }
  750.  
  751.     // Variables declaration - do not modify                    
  752.     private static javax.swing.ButtonGroup buttonGroup1;
  753.     private static javax.swing.JButton jButton1;
  754.     private static javax.swing.JButton jButton2;
  755.     private static javax.swing.JButton jButton3;
  756.     private static javax.swing.JLabel jLabel1;
  757.     private static javax.swing.JLabel jLabel2;
  758.     private static javax.swing.JLabel jLabel3;
  759.     private static javax.swing.JLabel jLabel4;
  760.     private javax.swing.JMenu jMenu1;
  761.     private javax.swing.JMenu jMenu2;
  762.     private static javax.swing.JMenuBar jMenuBar1;
  763.     private javax.swing.JMenuItem jMenuItem1;
  764.     private javax.swing.JMenuItem jMenuItem3;
  765.     private static javax.swing.JRadioButton jRadioButton1;
  766.     private static javax.swing.JRadioButton jRadioButton2;
  767.     private static javax.swing.JScrollPane jScrollPane1;
  768.     private static javax.swing.JScrollPane jScrollPane2;
  769.     private static javax.swing.JScrollPane jScrollPane3;
  770.     private static javax.swing.JTextArea jTextArea1;
  771.     private static javax.swing.JTextArea jTextArea2;
  772.     private static javax.swing.JTextArea jTextArea3;
  773.     private static javax.swing.JTextField jTextField1;
  774.     private static javax.swing.JTextField jTextField2;
  775.     private static javax.swing.JTextField jTextField3;
  776.     // End of variables declaration                  
  777.  
  778. }
Add Comment
Please, Sign In to add comment