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.1KB

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