PageRenderTime 29ms CodeModel.GetById 23ms RepoModel.GetById 0ms app.codeStats 0ms

/src/mpv5/ui/frames/MPCalculator2.java

http://mp-rechnungs-und-kundenverwaltung.googlecode.com/
Java | 100 lines | 47 code | 16 blank | 37 comment | 2 complexity | 633aa5a1c86edf3a1b0fef0546d9b7a8 MD5 | raw file
Possible License(s): LGPL-3.0, Apache-2.0, GPL-3.0, GPL-2.0, AGPL-3.0, JSON, BSD-3-Clause
  1. /*
  2. * This file is part of YaBS.
  3. *
  4. * YaBS is free software: you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License as published by
  6. * the Free Software Foundation, either version 3 of the License, or
  7. * (at your option) any later version.
  8. *
  9. * YaBS is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with YaBS. If not, see <http://www.gnu.org/licenses/>.
  16. */
  17. /*
  18. * MPCalculator2.java
  19. *
  20. * Created on 12.02.2009, 14:30:32
  21. */
  22. package mpv5.ui.frames;
  23. import java.awt.BorderLayout;
  24. import mpv5.ui.misc.Position;
  25. import mpv5.ui.misc.Calc;
  26. /**
  27. *
  28. *
  29. */
  30. public class MPCalculator2 extends javax.swing.JFrame {
  31. private static MPCalculator2 calc;
  32. private static final long serialVersionUID = 1L;
  33. /** Creates new form MPCalculator2 */
  34. private MPCalculator2() {
  35. initComponents();
  36. jPanel1.add(new Calc(), BorderLayout.CENTER);
  37. setSize(340, 300);
  38. setResizable(false);
  39. new Position(this);
  40. }
  41. public static MPCalculator2 instanceOf() {
  42. if (calc == null) {
  43. calc = new MPCalculator2();
  44. }
  45. calc.setVisible(true);
  46. return calc;
  47. }
  48. /**
  49. *
  50. */
  51. @Override
  52. public void dispose() {
  53. setVisible(false);
  54. }
  55. /** This method is called from within the constructor to
  56. * initialize the form.
  57. * WARNING: Do NOT modify this code. The content of this method is
  58. * always regenerated by the Form Editor.
  59. */
  60. @SuppressWarnings("unchecked")
  61. // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
  62. private void initComponents() {
  63. jPanel1 = new javax.swing.JPanel();
  64. setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
  65. setTitle("Yabs Calc");
  66. setName("Form"); // NOI18N
  67. jPanel1.setName("jPanel1"); // NOI18N
  68. jPanel1.setLayout(new java.awt.BorderLayout());
  69. javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
  70. getContentPane().setLayout(layout);
  71. layout.setHorizontalGroup(
  72. layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  73. .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 277, Short.MAX_VALUE)
  74. );
  75. layout.setVerticalGroup(
  76. layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  77. .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 139, Short.MAX_VALUE)
  78. );
  79. pack();
  80. }// </editor-fold>//GEN-END:initComponents
  81. // Variables declaration - do not modify//GEN-BEGIN:variables
  82. private javax.swing.JPanel jPanel1;
  83. // End of variables declaration//GEN-END:variables
  84. }