You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ChatView.java 5.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  1. /*
  2. * To change this license header, choose License Headers in Project Properties.
  3. * To change this template file, choose Tools | Templates
  4. * and open the template in the editor.
  5. */
  6. package netz.view;
  7. /**
  8. *
  9. * @author hd
  10. */
  11. public class ChatView extends javax.swing.JFrame
  12. {
  13. /**
  14. * @return the btnSend
  15. */
  16. public javax.swing.JButton getBtnSend()
  17. {
  18. return btnSend;
  19. }
  20. /**
  21. * @return the btnSetClient
  22. */
  23. public javax.swing.JButton getBtnSetClient()
  24. {
  25. return btnSetClient;
  26. }
  27. /**
  28. * @return the btnSetServer
  29. */
  30. public javax.swing.JButton getBtnSetServer()
  31. {
  32. return btnSetServer;
  33. }
  34. /**
  35. * @return the lblStatusDialog
  36. */
  37. public javax.swing.JLabel getLblStatusDialog()
  38. {
  39. return lblStatusDialog;
  40. }
  41. /**
  42. * @param lblStatusDialog the lblStatusDialog to set
  43. */
  44. public void setLblStatusDialog(javax.swing.JLabel lblStatusDialog)
  45. {
  46. this.lblStatusDialog = lblStatusDialog;
  47. }
  48. /**
  49. * @return the lblType
  50. */
  51. public javax.swing.JLabel getLblType()
  52. {
  53. return lblType;
  54. }
  55. /**
  56. * @param lblType the lblType to set
  57. */
  58. public void setLblType(javax.swing.JLabel lblType)
  59. {
  60. this.lblType = lblType;
  61. }
  62. /**
  63. * @return the txtField
  64. */
  65. public javax.swing.JTextField getTxtField()
  66. {
  67. return txtField;
  68. }
  69. /**
  70. * @param txtField the txtField to set
  71. */
  72. public void setTxtField(javax.swing.JTextField txtField)
  73. {
  74. this.txtField = txtField;
  75. }
  76. /**
  77. * Creates new form chatView
  78. */
  79. public ChatView()
  80. {
  81. initComponents();
  82. }
  83. /**
  84. * This method is called from within the constructor to initialize the form.
  85. * WARNING: Do NOT modify this code. The content of this method is always
  86. * regenerated by the Form Editor.
  87. */
  88. @SuppressWarnings("unchecked")
  89. // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
  90. private void initComponents()
  91. {
  92. jPanel1 = new javax.swing.JPanel();
  93. lblType = new javax.swing.JLabel();
  94. btnSetClient = new javax.swing.JButton();
  95. btnSetServer = new javax.swing.JButton();
  96. txtField = new javax.swing.JTextField();
  97. btnSend = new javax.swing.JButton();
  98. lblStatusDialog = new javax.swing.JLabel();
  99. setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
  100. setTitle("ChatTool");
  101. jPanel1.setLayout(new java.awt.GridLayout());
  102. lblType.setText("Client");
  103. jPanel1.add(lblType);
  104. btnSetClient.setText("Client");
  105. jPanel1.add(btnSetClient);
  106. btnSetServer.setText("Server");
  107. jPanel1.add(btnSetServer);
  108. getContentPane().add(jPanel1, java.awt.BorderLayout.PAGE_START);
  109. txtField.setText("jTextField1");
  110. getContentPane().add(txtField, java.awt.BorderLayout.CENTER);
  111. btnSend.setText("Send");
  112. getContentPane().add(btnSend, java.awt.BorderLayout.LINE_END);
  113. lblStatusDialog.setText("\"\"");
  114. getContentPane().add(lblStatusDialog, java.awt.BorderLayout.PAGE_END);
  115. pack();
  116. }// </editor-fold>//GEN-END:initComponents
  117. /**
  118. * @param args the command line arguments
  119. */
  120. public static void main(String args[])
  121. {
  122. /* Set the Nimbus look and feel */
  123. //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
  124. /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
  125. * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
  126. */
  127. try
  128. {
  129. for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels())
  130. {
  131. if ("Nimbus".equals(info.getName()))
  132. {
  133. javax.swing.UIManager.setLookAndFeel(info.getClassName());
  134. break;
  135. }
  136. }
  137. }
  138. catch (ClassNotFoundException ex)
  139. {
  140. java.util.logging.Logger.getLogger(ChatView.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
  141. }
  142. catch (InstantiationException ex)
  143. {
  144. java.util.logging.Logger.getLogger(ChatView.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
  145. }
  146. catch (IllegalAccessException ex)
  147. {
  148. java.util.logging.Logger.getLogger(ChatView.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
  149. }
  150. catch (javax.swing.UnsupportedLookAndFeelException ex)
  151. {
  152. java.util.logging.Logger.getLogger(ChatView.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
  153. }
  154. //</editor-fold>
  155. //</editor-fold>
  156. /* Create and display the form */
  157. java.awt.EventQueue.invokeLater(new Runnable()
  158. {
  159. public void run()
  160. {
  161. new ChatView().setVisible(true);
  162. }
  163. });
  164. }
  165. // Variables declaration - do not modify//GEN-BEGIN:variables
  166. private javax.swing.JButton btnSend;
  167. private javax.swing.JButton btnSetClient;
  168. private javax.swing.JButton btnSetServer;
  169. private javax.swing.JPanel jPanel1;
  170. private javax.swing.JLabel lblStatusDialog;
  171. private javax.swing.JLabel lblType;
  172. private javax.swing.JTextField txtField;
  173. // End of variables declaration//GEN-END:variables
  174. }