Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.awt.*;
- import java.awt.event.*;
- import javax.swing.*;
- @SuppressWarnings("serial")
- public class form extends JFrame {
- public form() {
- initComponents();
- }
- public void button1ActionPerformed(ActionEvent e) {
- String field1 = mainAccount.getSelectedText();
- String field2 = botEmail.getSelectedText();
- String field3 = botPass.getSelectedText();
- int field4 = accountNumber.getValue();
- int account;
- if (mainButton.isEnabled()) {
- account = 0;
- dispose();
- } else if (botButton.isEnabled()) {
- account = 1;
- dispose();
- }
- }
- private void initComponents() {
- // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents
- // Generated using JFormDesigner Evaluation license - cody short
- label1 = new JLabel();
- label2 = new JLabel();
- label3 = new JLabel();
- mainButton = new JRadioButton();
- botButton = new JRadioButton();
- mainAccount = new JFormattedTextField();
- label4 = new JLabel();
- label5 = new JLabel();
- botEmail = new JFormattedTextField();
- label6 = new JLabel();
- botAccount = new JFormattedTextField();
- label7 = new JLabel();
- botPass = new JFormattedTextField();
- button1 = new JButton();
- accountNumber = new JSlider();
- label8 = new JLabel();
- //======== this ========
- Container contentPane = getContentPane();
- //---- label1 ----
- label1.setText("Bot Trader");
- label1.setFont(new Font("Victorian LET", Font.PLAIN, 46));
- //---- label2 ----
- label2.setText("Made By:");
- label2.setFont(new Font("Tw Cen MT", Font.PLAIN, 18));
- //---- label3 ----
- label3.setText("Yo Funkey");
- label3.setFont(new Font("Smudger LET", Font.PLAIN, 36));
- //---- mainButton ----
- mainButton.setText("Main Account");
- //---- botButton ----
- botButton.setText("Bots");
- //---- label4 ----
- label4.setText("Main Account:");
- //---- label5 ----
- label5.setText("Bot Email:");
- //---- label6 ----
- label6.setText("Bot Account:");
- //---- label7 ----
- label7.setText("Bot Pass:");
- //---- button1 ----
- button1.setText("Start");
- button1.setFont(new Font("Victorian LET", Font.PLAIN, 26));
- button1.addActionListener(new ActionListener() {
- @Override
- public void actionPerformed(ActionEvent e) {
- button1ActionPerformed(e);
- }
- });
- //---- accountNumber ----
- accountNumber.setMaximum(9);
- accountNumber.setValue(0);
- accountNumber.setPaintTicks(true);
- accountNumber.setPaintLabels(true);
- accountNumber.setSnapToTicks(true);
- accountNumber.setMinorTickSpacing(1);
- //---- label8 ----
- label8.setText(" 0 1 2 3 4 5 6 7 8 9");
- GroupLayout contentPaneLayout = new GroupLayout(contentPane);
- contentPane.setLayout(contentPaneLayout);
- contentPaneLayout.setHorizontalGroup(
- contentPaneLayout.createParallelGroup()
- .addGroup(contentPaneLayout.createSequentialGroup()
- .addContainerGap()
- .addGroup(contentPaneLayout.createParallelGroup()
- .addGroup(contentPaneLayout.createSequentialGroup()
- .addGroup(contentPaneLayout.createParallelGroup()
- .addComponent(label6, GroupLayout.PREFERRED_SIZE, 70, GroupLayout.PREFERRED_SIZE)
- .addComponent(label7, GroupLayout.PREFERRED_SIZE, 65, GroupLayout.PREFERRED_SIZE)
- .addGroup(contentPaneLayout.createParallelGroup(GroupLayout.Alignment.TRAILING, false)
- .addComponent(label5, GroupLayout.Alignment.LEADING, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
- .addComponent(botButton, GroupLayout.Alignment.LEADING)
- .addComponent(label4, GroupLayout.Alignment.LEADING, GroupLayout.DEFAULT_SIZE, 79, Short.MAX_VALUE)))
- .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
- .addGroup(contentPaneLayout.createParallelGroup(GroupLayout.Alignment.LEADING, false)
- .addComponent(botPass)
- .addComponent(botEmail)
- .addComponent(botAccount)
- .addComponent(mainAccount, GroupLayout.DEFAULT_SIZE, 178, Short.MAX_VALUE)))
- .addGroup(GroupLayout.Alignment.TRAILING, contentPaneLayout.createSequentialGroup()
- .addGroup(contentPaneLayout.createParallelGroup()
- .addComponent(accountNumber, GroupLayout.DEFAULT_SIZE, 232, Short.MAX_VALUE)
- .addComponent(label8, GroupLayout.DEFAULT_SIZE, 232, Short.MAX_VALUE))
- .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(button1, GroupLayout.PREFERRED_SIZE, 95, GroupLayout.PREFERRED_SIZE)
- .addGap(198, 198, 198))
- .addGroup(contentPaneLayout.createSequentialGroup()
- .addGroup(contentPaneLayout.createParallelGroup()
- .addComponent(label1, GroupLayout.PREFERRED_SIZE, 193, GroupLayout.PREFERRED_SIZE)
- .addComponent(mainButton))
- .addGroup(contentPaneLayout.createParallelGroup()
- .addGroup(contentPaneLayout.createSequentialGroup()
- .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
- .addComponent(label2, GroupLayout.PREFERRED_SIZE, 75, GroupLayout.PREFERRED_SIZE)
- .addGap(257, 257, 257))
- .addGroup(contentPaneLayout.createSequentialGroup()
- .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
- .addComponent(label3, GroupLayout.PREFERRED_SIZE, 147, GroupLayout.PREFERRED_SIZE)
- .addContainerGap())))))
- );
- contentPaneLayout.setVerticalGroup(
- contentPaneLayout.createParallelGroup()
- .addGroup(contentPaneLayout.createSequentialGroup()
- .addGroup(contentPaneLayout.createParallelGroup()
- .addGroup(contentPaneLayout.createSequentialGroup()
- .addComponent(label2, GroupLayout.PREFERRED_SIZE, 27, GroupLayout.PREFERRED_SIZE)
- .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(label3))
- .addGroup(contentPaneLayout.createSequentialGroup()
- .addComponent(label1)
- .addGap(18, 18, 18)
- .addComponent(mainButton)))
- .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED, 6, Short.MAX_VALUE)
- .addGroup(contentPaneLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
- .addComponent(botAccount, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
- .addComponent(label6))
- .addGap(18, 18, 18)
- .addGroup(contentPaneLayout.createParallelGroup(GroupLayout.Alignment.TRAILING)
- .addComponent(mainAccount, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
- .addGroup(contentPaneLayout.createSequentialGroup()
- .addComponent(botButton)
- .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
- .addComponent(label4)))
- .addGap(18, 18, 18)
- .addGroup(contentPaneLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
- .addComponent(label5)
- .addComponent(botEmail, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
- .addGap(18, 18, 18)
- .addGroup(contentPaneLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
- .addComponent(label7)
- .addComponent(botPass, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
- .addGap(18, 18, 18)
- .addGroup(contentPaneLayout.createParallelGroup(GroupLayout.Alignment.TRAILING)
- .addGroup(GroupLayout.Alignment.LEADING, contentPaneLayout.createSequentialGroup()
- .addComponent(accountNumber, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
- .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
- .addComponent(label8))
- .addComponent(button1))
- .addContainerGap())
- );
- pack();
- setLocationRelativeTo(getOwner());
- // JFormDesigner - End of component initialization //GEN-END:initComponents
- }
- // JFormDesigner - Variables declaration - DO NOT MODIFY //GEN-BEGIN:variables
- // Generated using JFormDesigner Evaluation license - cody short
- private JLabel label1;
- private JLabel label2;
- private JLabel label3;
- private JRadioButton mainButton;
- private JRadioButton botButton;
- private JFormattedTextField mainAccount;
- private JLabel label4;
- private JLabel label5;
- private JFormattedTextField botEmail;
- private JLabel label6;
- private JFormattedTextField botAccount;
- private JLabel label7;
- private JFormattedTextField botPass;
- private JButton button1;
- private JSlider accountNumber;
- private JLabel label8;
- // JFormDesigner - End of variables declaration //GEN-END:variables
- }
Add Comment
Please, Sign In to add comment