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 4.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  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. public javax.swing.JTextField getTextField()
  31. {
  32. return textField;
  33. }
  34. /**
  35. * @param textField the textField to set
  36. */
  37. public void setTextField(javax.swing.JTextField textField)
  38. {
  39. this.textField = textField;
  40. }
  41. /**
  42. * @return the txtArea
  43. */
  44. public javax.swing.JTextArea getTxtArea()
  45. {
  46. return txtArea;
  47. }
  48. /**
  49. * @param txtArea the txtArea to set
  50. */
  51. public void setTxtArea(javax.swing.JTextArea txtArea)
  52. {
  53. this.txtArea = txtArea;
  54. }
  55. /**
  56. * Creates new form Hauptfenster
  57. */
  58. public Hauptfenster()
  59. {
  60. initComponents();
  61. }
  62. /**
  63. * This method is called from within the constructor to initialize the form.
  64. * WARNING: Do NOT modify this code. The content of this method is always
  65. * regenerated by the Form Editor.
  66. */
  67. @SuppressWarnings("unchecked")
  68. // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
  69. private void initComponents()
  70. {
  71. jScrollPane1 = new javax.swing.JScrollPane();
  72. txtArea = new javax.swing.JTextArea();
  73. textField = new javax.swing.JTextField();
  74. jPanel1 = new javax.swing.JPanel();
  75. btn1 = new javax.swing.JButton();
  76. btn2 = new javax.swing.JButton();
  77. setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
  78. txtArea.setColumns(20);
  79. txtArea.setRows(5);
  80. jScrollPane1.setViewportView(txtArea);
  81. getContentPane().add(jScrollPane1, java.awt.BorderLayout.CENTER);
  82. getContentPane().add(textField, java.awt.BorderLayout.PAGE_START);
  83. btn1.setText("btn1");
  84. jPanel1.add(btn1);
  85. btn2.setText("btn2");
  86. jPanel1.add(btn2);
  87. getContentPane().add(jPanel1, java.awt.BorderLayout.PAGE_END);
  88. pack();
  89. setLocationRelativeTo(null);
  90. }// </editor-fold>//GEN-END:initComponents
  91. /**
  92. * @param args the command line arguments
  93. */
  94. public static void main(String args[])
  95. {
  96. /* Set the Nimbus look and feel */
  97. //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
  98. /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
  99. * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
  100. */
  101. try
  102. {
  103. for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels())
  104. {
  105. if ("Nimbus".equals(info.getName()))
  106. {
  107. javax.swing.UIManager.setLookAndFeel(info.getClassName());
  108. break;
  109. }
  110. }
  111. }
  112. catch (ClassNotFoundException ex)
  113. {
  114. java.util.logging.Logger.getLogger(Hauptfenster.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
  115. }
  116. catch (InstantiationException ex)
  117. {
  118. java.util.logging.Logger.getLogger(Hauptfenster.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
  119. }
  120. catch (IllegalAccessException ex)
  121. {
  122. java.util.logging.Logger.getLogger(Hauptfenster.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
  123. }
  124. catch (javax.swing.UnsupportedLookAndFeelException ex)
  125. {
  126. java.util.logging.Logger.getLogger(Hauptfenster.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
  127. }
  128. //</editor-fold>
  129. /* Create and display the form */
  130. java.awt.EventQueue.invokeLater(new Runnable()
  131. {
  132. public void run()
  133. {
  134. new Hauptfenster().setVisible(true);
  135. }
  136. });
  137. }
  138. // Variables declaration - do not modify//GEN-BEGIN:variables
  139. private javax.swing.JButton btn1;
  140. private javax.swing.JButton btn2;
  141. private javax.swing.JPanel jPanel1;
  142. private javax.swing.JScrollPane jScrollPane1;
  143. private javax.swing.JTextField textField;
  144. private javax.swing.JTextArea txtArea;
  145. // End of variables declaration//GEN-END:variables
  146. }