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.

Hauptfenster.java 6.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243
  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 gui;
  7. /**
  8. *
  9. * @author Normal
  10. */
  11. public class Hauptfenster extends javax.swing.JFrame
  12. {
  13. /**
  14. * @return the btn1
  15. */
  16. public javax.swing.JButton getBtn1()
  17. {
  18. return btn1;
  19. }
  20. /**
  21. * @return the btn2
  22. */
  23. public javax.swing.JButton getBtn2()
  24. {
  25. return btn2;
  26. }
  27. /**
  28. * @return the textField
  29. */
  30. /**
  31. * @param textField the textField to set
  32. */
  33. /**
  34. * @return the txtArea
  35. */
  36. public javax.swing.JTextArea getTxtArea()
  37. {
  38. return txtArea;
  39. }
  40. /**
  41. * @param txtArea the txtArea to set
  42. */
  43. public void setTxtArea(javax.swing.JTextArea txtArea)
  44. {
  45. this.txtArea = txtArea;
  46. }
  47. /**
  48. * Creates new form Hauptfenster
  49. */
  50. public Hauptfenster()
  51. {
  52. initComponents();
  53. }
  54. /**
  55. * This method is called from within the constructor to initialize the form.
  56. * WARNING: Do NOT modify this code. The content of this method is always
  57. * regenerated by the Form Editor.
  58. */
  59. @SuppressWarnings("unchecked")
  60. // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
  61. private void initComponents()
  62. {
  63. jScrollPane1 = new javax.swing.JScrollPane();
  64. txtArea = new javax.swing.JTextArea();
  65. jPanel1 = new javax.swing.JPanel();
  66. btn1 = new javax.swing.JButton();
  67. btn2 = new javax.swing.JButton();
  68. jButton1 = new javax.swing.JButton();
  69. jPanel3 = new javax.swing.JPanel();
  70. jPanel4 = new javax.swing.JPanel();
  71. jLabel1 = new javax.swing.JLabel();
  72. jLabel2 = new javax.swing.JLabel();
  73. jLabel3 = new javax.swing.JLabel();
  74. jPanel2 = new javax.swing.JPanel();
  75. lblmyIP = new javax.swing.JLabel();
  76. txtServerIP = new javax.swing.JTextField();
  77. txtcallIP = new javax.swing.JTextField();
  78. setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
  79. txtArea.setColumns(20);
  80. txtArea.setRows(5);
  81. jScrollPane1.setViewportView(txtArea);
  82. getContentPane().add(jScrollPane1, java.awt.BorderLayout.CENTER);
  83. btn1.setText("Register");
  84. btn1.setToolTipText("Registrierung am Server");
  85. jPanel1.add(btn1);
  86. btn2.setText("Anrufen");
  87. jPanel1.add(btn2);
  88. jButton1.setText("Annehmen");
  89. jPanel1.add(jButton1);
  90. getContentPane().add(jPanel1, java.awt.BorderLayout.PAGE_END);
  91. jPanel4.setLayout(new javax.swing.BoxLayout(jPanel4, javax.swing.BoxLayout.Y_AXIS));
  92. jLabel1.setText("My IP:");
  93. jLabel1.setFocusable(false);
  94. jLabel1.setInheritsPopupMenu(false);
  95. jPanel4.add(jLabel1);
  96. jLabel2.setText("Server IP:");
  97. jPanel4.add(jLabel2);
  98. jLabel3.setText("Call IP:");
  99. jPanel4.add(jLabel3);
  100. jPanel3.add(jPanel4);
  101. jPanel2.setLayout(new javax.swing.BoxLayout(jPanel2, javax.swing.BoxLayout.Y_AXIS));
  102. lblmyIP.setText("xxx.xxx.xxx.xxx");
  103. lblmyIP.setToolTipText("");
  104. lblmyIP.setVerticalAlignment(javax.swing.SwingConstants.TOP);
  105. jPanel2.add(lblmyIP);
  106. txtServerIP.setText("xxx.xxx.xxx.xxx");
  107. jPanel2.add(txtServerIP);
  108. txtcallIP.setText("xxx.xxx.xxx.xxx");
  109. jPanel2.add(txtcallIP);
  110. jPanel3.add(jPanel2);
  111. getContentPane().add(jPanel3, java.awt.BorderLayout.PAGE_START);
  112. pack();
  113. setLocationRelativeTo(null);
  114. }// </editor-fold>//GEN-END:initComponents
  115. /**
  116. * @param args the command line arguments
  117. */
  118. public static void main(String args[])
  119. {
  120. /* Set the Nimbus look and feel */
  121. //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
  122. /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
  123. * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
  124. */
  125. try
  126. {
  127. for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels())
  128. {
  129. if ("Nimbus".equals(info.getName()))
  130. {
  131. javax.swing.UIManager.setLookAndFeel(info.getClassName());
  132. break;
  133. }
  134. }
  135. }
  136. catch (ClassNotFoundException ex)
  137. {
  138. java.util.logging.Logger.getLogger(Hauptfenster.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
  139. }
  140. catch (InstantiationException ex)
  141. {
  142. java.util.logging.Logger.getLogger(Hauptfenster.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
  143. }
  144. catch (IllegalAccessException ex)
  145. {
  146. java.util.logging.Logger.getLogger(Hauptfenster.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
  147. }
  148. catch (javax.swing.UnsupportedLookAndFeelException ex)
  149. {
  150. java.util.logging.Logger.getLogger(Hauptfenster.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
  151. }
  152. //</editor-fold>
  153. /* Create and display the form */
  154. java.awt.EventQueue.invokeLater(new Runnable()
  155. {
  156. public void run()
  157. {
  158. new Hauptfenster().setVisible(true);
  159. }
  160. });
  161. }
  162. // Variables declaration - do not modify//GEN-BEGIN:variables
  163. private javax.swing.JButton btn1;
  164. private javax.swing.JButton btn2;
  165. private javax.swing.JButton jButton1;
  166. private javax.swing.JLabel jLabel1;
  167. private javax.swing.JLabel jLabel2;
  168. private javax.swing.JLabel jLabel3;
  169. private javax.swing.JPanel jPanel1;
  170. private javax.swing.JPanel jPanel2;
  171. private javax.swing.JPanel jPanel3;
  172. private javax.swing.JPanel jPanel4;
  173. private javax.swing.JScrollPane jScrollPane1;
  174. private javax.swing.JLabel lblmyIP;
  175. private javax.swing.JTextArea txtArea;
  176. private javax.swing.JTextField txtServerIP;
  177. private javax.swing.JTextField txtcallIP;
  178. // End of variables declaration//GEN-END:variables
  179. /**
  180. * @return the lblmyIP
  181. */
  182. public javax.swing.JLabel getLblmyIP()
  183. {
  184. return lblmyIP;
  185. }
  186. /**
  187. * @param lblmyIP the lblmyIP to set
  188. */
  189. public void setLblmyIP(javax.swing.JLabel lblmyIP)
  190. {
  191. this.lblmyIP = lblmyIP;
  192. }
  193. /**
  194. * @return the txtServerIP
  195. */
  196. public javax.swing.JTextField getTxtServerIP()
  197. {
  198. return txtServerIP;
  199. }
  200. /**
  201. * @return the txtcallIP
  202. */
  203. public javax.swing.JTextField getTxtcallIP()
  204. {
  205. return txtcallIP;
  206. }
  207. }