Guest User

Untitled

a guest
Oct 22nd, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.46 KB | None | 0 0
  1. import java.awt.*;
  2. import java.awt.event.*;
  3. import javax.swing.*;
  4.  
  5.  
  6.  
  7. @SuppressWarnings("serial")
  8. public class form extends JFrame {
  9. public form() {
  10. initComponents();
  11. }
  12.  
  13. public void button1ActionPerformed(ActionEvent e) {
  14. String field1 = mainAccount.getSelectedText();
  15. String field2 = botEmail.getSelectedText();
  16. String field3 = botPass.getSelectedText();
  17. int field4 = accountNumber.getValue();
  18. int account;
  19. if (mainButton.isEnabled()) {
  20. account = 0;
  21. dispose();
  22. } else if (botButton.isEnabled()) {
  23. account = 1;
  24. dispose();
  25. }
  26. }
  27.  
  28. private void initComponents() {
  29. // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents
  30. // Generated using JFormDesigner Evaluation license - cody short
  31. label1 = new JLabel();
  32. label2 = new JLabel();
  33. label3 = new JLabel();
  34. mainButton = new JRadioButton();
  35. botButton = new JRadioButton();
  36. mainAccount = new JFormattedTextField();
  37. label4 = new JLabel();
  38. label5 = new JLabel();
  39. botEmail = new JFormattedTextField();
  40. label6 = new JLabel();
  41. botAccount = new JFormattedTextField();
  42. label7 = new JLabel();
  43. botPass = new JFormattedTextField();
  44. button1 = new JButton();
  45. accountNumber = new JSlider();
  46. label8 = new JLabel();
  47.  
  48. //======== this ========
  49. Container contentPane = getContentPane();
  50.  
  51. //---- label1 ----
  52. label1.setText("Bot Trader");
  53. label1.setFont(new Font("Victorian LET", Font.PLAIN, 46));
  54.  
  55. //---- label2 ----
  56. label2.setText("Made By:");
  57. label2.setFont(new Font("Tw Cen MT", Font.PLAIN, 18));
  58.  
  59. //---- label3 ----
  60. label3.setText("Yo Funkey");
  61. label3.setFont(new Font("Smudger LET", Font.PLAIN, 36));
  62.  
  63. //---- mainButton ----
  64. mainButton.setText("Main Account");
  65.  
  66. //---- botButton ----
  67. botButton.setText("Bots");
  68.  
  69. //---- label4 ----
  70. label4.setText("Main Account:");
  71.  
  72. //---- label5 ----
  73. label5.setText("Bot Email:");
  74.  
  75. //---- label6 ----
  76. label6.setText("Bot Account:");
  77.  
  78. //---- label7 ----
  79. label7.setText("Bot Pass:");
  80.  
  81. //---- button1 ----
  82. button1.setText("Start");
  83. button1.setFont(new Font("Victorian LET", Font.PLAIN, 26));
  84. button1.addActionListener(new ActionListener() {
  85. @Override
  86. public void actionPerformed(ActionEvent e) {
  87. button1ActionPerformed(e);
  88. }
  89. });
  90.  
  91. //---- accountNumber ----
  92. accountNumber.setMaximum(9);
  93. accountNumber.setValue(0);
  94. accountNumber.setPaintTicks(true);
  95. accountNumber.setPaintLabels(true);
  96. accountNumber.setSnapToTicks(true);
  97. accountNumber.setMinorTickSpacing(1);
  98.  
  99. //---- label8 ----
  100. label8.setText(" 0 1 2 3 4 5 6 7 8 9");
  101.  
  102. GroupLayout contentPaneLayout = new GroupLayout(contentPane);
  103. contentPane.setLayout(contentPaneLayout);
  104. contentPaneLayout.setHorizontalGroup(
  105. contentPaneLayout.createParallelGroup()
  106. .addGroup(contentPaneLayout.createSequentialGroup()
  107. .addContainerGap()
  108. .addGroup(contentPaneLayout.createParallelGroup()
  109. .addGroup(contentPaneLayout.createSequentialGroup()
  110. .addGroup(contentPaneLayout.createParallelGroup()
  111. .addComponent(label6, GroupLayout.PREFERRED_SIZE, 70, GroupLayout.PREFERRED_SIZE)
  112. .addComponent(label7, GroupLayout.PREFERRED_SIZE, 65, GroupLayout.PREFERRED_SIZE)
  113. .addGroup(contentPaneLayout.createParallelGroup(GroupLayout.Alignment.TRAILING, false)
  114. .addComponent(label5, GroupLayout.Alignment.LEADING, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
  115. .addComponent(botButton, GroupLayout.Alignment.LEADING)
  116. .addComponent(label4, GroupLayout.Alignment.LEADING, GroupLayout.DEFAULT_SIZE, 79, Short.MAX_VALUE)))
  117. .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
  118. .addGroup(contentPaneLayout.createParallelGroup(GroupLayout.Alignment.LEADING, false)
  119. .addComponent(botPass)
  120. .addComponent(botEmail)
  121. .addComponent(botAccount)
  122. .addComponent(mainAccount, GroupLayout.DEFAULT_SIZE, 178, Short.MAX_VALUE)))
  123. .addGroup(GroupLayout.Alignment.TRAILING, contentPaneLayout.createSequentialGroup()
  124. .addGroup(contentPaneLayout.createParallelGroup()
  125. .addComponent(accountNumber, GroupLayout.DEFAULT_SIZE, 232, Short.MAX_VALUE)
  126. .addComponent(label8, GroupLayout.DEFAULT_SIZE, 232, Short.MAX_VALUE))
  127. .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
  128. .addComponent(button1, GroupLayout.PREFERRED_SIZE, 95, GroupLayout.PREFERRED_SIZE)
  129. .addGap(198, 198, 198))
  130. .addGroup(contentPaneLayout.createSequentialGroup()
  131. .addGroup(contentPaneLayout.createParallelGroup()
  132. .addComponent(label1, GroupLayout.PREFERRED_SIZE, 193, GroupLayout.PREFERRED_SIZE)
  133. .addComponent(mainButton))
  134. .addGroup(contentPaneLayout.createParallelGroup()
  135. .addGroup(contentPaneLayout.createSequentialGroup()
  136. .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
  137. .addComponent(label2, GroupLayout.PREFERRED_SIZE, 75, GroupLayout.PREFERRED_SIZE)
  138. .addGap(257, 257, 257))
  139. .addGroup(contentPaneLayout.createSequentialGroup()
  140. .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
  141. .addComponent(label3, GroupLayout.PREFERRED_SIZE, 147, GroupLayout.PREFERRED_SIZE)
  142. .addContainerGap())))))
  143. );
  144. contentPaneLayout.setVerticalGroup(
  145. contentPaneLayout.createParallelGroup()
  146. .addGroup(contentPaneLayout.createSequentialGroup()
  147. .addGroup(contentPaneLayout.createParallelGroup()
  148. .addGroup(contentPaneLayout.createSequentialGroup()
  149. .addComponent(label2, GroupLayout.PREFERRED_SIZE, 27, GroupLayout.PREFERRED_SIZE)
  150. .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
  151. .addComponent(label3))
  152. .addGroup(contentPaneLayout.createSequentialGroup()
  153. .addComponent(label1)
  154. .addGap(18, 18, 18)
  155. .addComponent(mainButton)))
  156. .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED, 6, Short.MAX_VALUE)
  157. .addGroup(contentPaneLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
  158. .addComponent(botAccount, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
  159. .addComponent(label6))
  160. .addGap(18, 18, 18)
  161. .addGroup(contentPaneLayout.createParallelGroup(GroupLayout.Alignment.TRAILING)
  162. .addComponent(mainAccount, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
  163. .addGroup(contentPaneLayout.createSequentialGroup()
  164. .addComponent(botButton)
  165. .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
  166. .addComponent(label4)))
  167. .addGap(18, 18, 18)
  168. .addGroup(contentPaneLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
  169. .addComponent(label5)
  170. .addComponent(botEmail, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
  171. .addGap(18, 18, 18)
  172. .addGroup(contentPaneLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
  173. .addComponent(label7)
  174. .addComponent(botPass, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
  175. .addGap(18, 18, 18)
  176. .addGroup(contentPaneLayout.createParallelGroup(GroupLayout.Alignment.TRAILING)
  177. .addGroup(GroupLayout.Alignment.LEADING, contentPaneLayout.createSequentialGroup()
  178. .addComponent(accountNumber, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
  179. .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
  180. .addComponent(label8))
  181. .addComponent(button1))
  182. .addContainerGap())
  183. );
  184. pack();
  185. setLocationRelativeTo(getOwner());
  186. // JFormDesigner - End of component initialization //GEN-END:initComponents
  187. }
  188.  
  189. // JFormDesigner - Variables declaration - DO NOT MODIFY //GEN-BEGIN:variables
  190. // Generated using JFormDesigner Evaluation license - cody short
  191. private JLabel label1;
  192. private JLabel label2;
  193. private JLabel label3;
  194. private JRadioButton mainButton;
  195. private JRadioButton botButton;
  196. private JFormattedTextField mainAccount;
  197. private JLabel label4;
  198. private JLabel label5;
  199. private JFormattedTextField botEmail;
  200. private JLabel label6;
  201. private JFormattedTextField botAccount;
  202. private JLabel label7;
  203. private JFormattedTextField botPass;
  204. private JButton button1;
  205. private JSlider accountNumber;
  206. private JLabel label8;
  207. // JFormDesigner - End of variables declaration //GEN-END:variables
  208. }
Add Comment
Please, Sign In to add comment