Advertisement
Guest User

Untitled

a guest
Jun 27th, 2017
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.85 KB | None | 0 0
  1. import java.awt.*;
  2. import javax.swing.*;
  3. /*
  4. * Created by JFormDesigner on Sun Nov 14 15:02:19 CET 2010
  5. */
  6.  
  7.  
  8.  
  9. /**
  10. * @author patrick van de streek
  11. */
  12. public class ghoulGUI extends JPanel {
  13. public ghoulGUI() {
  14. initComponents();
  15. }
  16.  
  17. private void initComponents() {
  18. // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents
  19. // Generated using JFormDesigner Evaluation license - patrick van de streek
  20. frame1 = new JFrame();
  21. textField1 = new JTextField();
  22. textField2 = new JTextField();
  23. textField3 = new JTextField();
  24. textField4 = new JTextField();
  25. comboBox1 = new JComboBox();
  26. comboBox2 = new JComboBox();
  27. comboBox3 = new JComboBox();
  28.  
  29. //======== frame1 ========
  30. {
  31. frame1.setAlwaysOnTop(true);
  32. frame1.setFont(new Font("Eras Demi ITC", Font.BOLD | Font.ITALIC, 10));
  33. Container frame1ContentPane = frame1.getContentPane();
  34. frame1ContentPane.setLayout(null);
  35.  
  36. //---- textField1 ----
  37. textField1.setText("Ghoul Viruz Whiper");
  38. textField1.setFont(textField1.getFont().deriveFont(Font.BOLD|Font.ITALIC, textField1.getFont().getSize() + 10f));
  39. textField1.setBackground(null);
  40. frame1ContentPane.add(textField1);
  41. textField1.setBounds(70, 0, 220, 45);
  42.  
  43. //---- textField2 ----
  44. textField2.setText("Do you wanna bank?");
  45. textField2.setHorizontalAlignment(SwingConstants.CENTER);
  46. frame1ContentPane.add(textField2);
  47. textField2.setBounds(15, 85, 110, textField2.getPreferredSize().height);
  48.  
  49. //---- textField3 ----
  50. textField3.setText("Picking up charms?");
  51. textField3.setHorizontalAlignment(SwingConstants.CENTER);
  52. frame1ContentPane.add(textField3);
  53. textField3.setBounds(15, 190, 110, textField3.getPreferredSize().height);
  54.  
  55. //---- textField4 ----
  56. textField4.setText("withdrawing amount");
  57. textField4.setHorizontalAlignment(SwingConstants.CENTER);
  58. frame1ContentPane.add(textField4);
  59. textField4.setBounds(15, 135, 110, textField4.getPreferredSize().height);
  60.  
  61. //---- comboBox1 ----
  62. comboBox1.setModel(new DefaultComboBoxModel(new String[] {
  63. "Yes",
  64. "no"
  65. }));
  66. frame1ContentPane.add(comboBox1);
  67. comboBox1.setBounds(290, 85, 50, comboBox1.getPreferredSize().height);
  68.  
  69. //---- comboBox2 ----
  70. comboBox2.setModel(new DefaultComboBoxModel(new String[] {
  71. "10",
  72. "15",
  73. "20",
  74. "25"
  75. }));
  76. frame1ContentPane.add(comboBox2);
  77. comboBox2.setBounds(290, 135, 50, comboBox2.getPreferredSize().height);
  78.  
  79. //---- comboBox3 ----
  80. comboBox3.setModel(new DefaultComboBoxModel(new String[] {
  81. "yes",
  82. "no"
  83. }));
  84. frame1ContentPane.add(comboBox3);
  85. comboBox3.setBounds(290, 190, 50, comboBox3.getPreferredSize().height);
  86.  
  87. { // compute preferred size
  88. Dimension preferredSize = new Dimension();
  89. for(int i = 0; i < frame1ContentPane.getComponentCount(); i++) {
  90. Rectangle bounds = frame1ContentPane.getComponent(i).getBounds();
  91. preferredSize.width = Math.max(bounds.x + bounds.width, preferredSize.width);
  92. preferredSize.height = Math.max(bounds.y + bounds.height, preferredSize.height);
  93. }
  94. Insets insets = frame1ContentPane.getInsets();
  95. preferredSize.width += insets.right;
  96. preferredSize.height += insets.bottom;
  97. frame1ContentPane.setMinimumSize(preferredSize);
  98. frame1ContentPane.setPreferredSize(preferredSize);
  99. }
  100. frame1.pack();
  101. frame1.setLocationRelativeTo(frame1.getOwner());
  102. }
  103. // JFormDesigner - End of component initialization //GEN-END:initComponents
  104. }
  105.  
  106. // JFormDesigner - Variables declaration - DO NOT MODIFY //GEN-BEGIN:variables
  107. // Generated using JFormDesigner Evaluation license - patrick van de streek
  108. private JFrame frame1;
  109. private JTextField textField1;
  110. private JTextField textField2;
  111. private JTextField textField3;
  112. private JTextField textField4;
  113. private JComboBox comboBox1;
  114. private JComboBox comboBox2;
  115. private JComboBox comboBox3;
  116. // JFormDesigner - End of variables declaration //GEN-END:variables
  117. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement