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.

WuerfelView.java 4.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  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 bandit.view;
  7. /**
  8. *
  9. * @author chris
  10. */
  11. public class WuerfelView extends javax.swing.JFrame
  12. {
  13. /**
  14. * @return the btnStart
  15. */
  16. public javax.swing.JButton getBtnStart()
  17. {
  18. return btnStart;
  19. }
  20. /**
  21. * @return the btnStop
  22. */
  23. public javax.swing.JButton getBtnStop()
  24. {
  25. return btnStop;
  26. }
  27. /**
  28. * @return the lbZahl
  29. */
  30. public javax.swing.JLabel getLbZahl()
  31. {
  32. return lbZahl;
  33. }
  34. /**
  35. * @param lbZahl the lbZahl to set
  36. */
  37. public void setLbZahl(javax.swing.JLabel lbZahl)
  38. {
  39. this.lbZahl = lbZahl;
  40. }
  41. /**
  42. * Creates new form WuerfelView
  43. */
  44. public WuerfelView()
  45. {
  46. initComponents();
  47. }
  48. /**
  49. * This method is called from within the constructor to initialize the form.
  50. * WARNING: Do NOT modify this code. The content of this method is always
  51. * regenerated by the Form Editor.
  52. */
  53. @SuppressWarnings("unchecked")
  54. // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
  55. private void initComponents()
  56. {
  57. jPanel1 = new javax.swing.JPanel();
  58. btnStart = new javax.swing.JButton();
  59. btnStop = new javax.swing.JButton();
  60. jPanel2 = new javax.swing.JPanel();
  61. lbZahl1 = new javax.swing.JLabel();
  62. lbZahl2 = new javax.swing.JLabel();
  63. lbZahl3 = new javax.swing.JLabel();
  64. setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
  65. btnStart.setText("Start");
  66. jPanel1.add(btnStart);
  67. btnStop.setText("Stop");
  68. jPanel1.add(btnStop);
  69. getContentPane().add(jPanel1, java.awt.BorderLayout.PAGE_END);
  70. lbZahl1.setFont(new java.awt.Font("Tahoma", 0, 64)); // NOI18N
  71. lbZahl1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
  72. lbZahl1.setText("0");
  73. jPanel2.add(lbZahl1);
  74. lbZahl2.setFont(new java.awt.Font("Tahoma", 0, 64)); // NOI18N
  75. lbZahl2.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
  76. lbZahl2.setText("0");
  77. jPanel2.add(lbZahl2);
  78. lbZahl3.setFont(new java.awt.Font("Tahoma", 0, 64)); // NOI18N
  79. lbZahl3.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
  80. lbZahl3.setText("0");
  81. jPanel2.add(lbZahl3);
  82. getContentPane().add(jPanel2, java.awt.BorderLayout.CENTER);
  83. pack();
  84. }// </editor-fold>//GEN-END:initComponents
  85. /**
  86. * @param args the command line arguments
  87. */
  88. public static void main(String args[])
  89. {
  90. /* Set the Nimbus look and feel */
  91. //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
  92. /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
  93. * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
  94. */
  95. try
  96. {
  97. for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels())
  98. {
  99. if ("Nimbus".equals(info.getName()))
  100. {
  101. javax.swing.UIManager.setLookAndFeel(info.getClassName());
  102. break;
  103. }
  104. }
  105. }
  106. catch (ClassNotFoundException ex)
  107. {
  108. java.util.logging.Logger.getLogger(WuerfelView.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
  109. }
  110. catch (InstantiationException ex)
  111. {
  112. java.util.logging.Logger.getLogger(WuerfelView.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
  113. }
  114. catch (IllegalAccessException ex)
  115. {
  116. java.util.logging.Logger.getLogger(WuerfelView.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
  117. }
  118. catch (javax.swing.UnsupportedLookAndFeelException ex)
  119. {
  120. java.util.logging.Logger.getLogger(WuerfelView.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
  121. }
  122. //</editor-fold>
  123. /* Create and display the form */
  124. java.awt.EventQueue.invokeLater(new Runnable()
  125. {
  126. public void run()
  127. {
  128. new WuerfelView().setVisible(true);
  129. }
  130. });
  131. }
  132. // Variables declaration - do not modify//GEN-BEGIN:variables
  133. private javax.swing.JButton btnStart;
  134. private javax.swing.JButton btnStop;
  135. private javax.swing.JPanel jPanel1;
  136. private javax.swing.JPanel jPanel2;
  137. private javax.swing.JLabel lbZahl1;
  138. private javax.swing.JLabel lbZahl2;
  139. private javax.swing.JLabel lbZahl3;
  140. // End of variables declaration//GEN-END:variables
  141. }