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

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