Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package scripts.autoAlcherPro;
- import java.awt.Dimension;
- import java.awt.GridLayout;
- import java.awt.event.ActionEvent;
- import java.awt.event.ActionListener;
- import javax.swing.JButton;
- import javax.swing.JCheckBox;
- import javax.swing.JFrame;
- import javax.swing.JLabel;
- import javax.swing.JPanel;
- import javax.swing.JTabbedPane;
- import javax.swing.JTextField;
- public class GUI extends JFrame {
- private static final long serialVersionUID = 1L;
- private JTabbedPane main;
- private JPanel antiban;
- private JTextField itemName;
- private JLabel itemLabel;
- private JCheckBox walkAlch;
- private JCheckBox preformXp;
- private JCheckBox preformCamera;
- private JCheckBox preformClan;
- private JCheckBox preformPm;
- private JCheckBox preformFriendsCheck;
- private JLabel abanFreq;
- private JTextField freqMin;
- private JTextField freqMax;
- private JLabel walkTimeLabel;
- private JLabel to;
- private JTextField walkMin;
- private JTextField walkMax;
- private JButton startButton;
- private JPanel mainTab;
- private AutoAlcher alcher = new AutoAlcher();
- public GUI() {
- setName("JoeDezzy's AutoAlcher");
- setPreferredSize(new Dimension(300, 350));
- addComponents();
- setVisible(true);
- }
- private void addComponents() {
- //main pane
- main = new JTabbedPane();
- mainTab = new JPanel();
- mainTab.setName("Main");
- mainTab.setLayout(new GridLayout(10, 10));
- itemLabel = new JLabel();
- itemLabel.setLocation(20, 100);
- itemLabel.setText("Item name: ");
- itemLabel.setVisible(true);
- mainTab.add(itemLabel);
- itemName = new JTextField();
- itemName.setLocation(100, 100);
- itemName.setColumns(10);
- itemName.setVisible(true);
- mainTab.add(itemName);
- walkTimeLabel = new JLabel();
- walkTimeLabel.setText("Walking sleep time: (Timeout to do alchs)");
- walkTimeLabel.setLocation(400, 100);
- walkTimeLabel.setVisible(false);
- mainTab.add(walkTimeLabel);
- walkAlch = new JCheckBox();
- walkMin = new JTextField();
- walkMax = new JTextField();
- walkMin.setVisible(false);
- walkMax.setVisible(false);
- to = new JLabel("to:");
- to.setVisible(false);
- walkAlch.setLocation(20, 250);
- walkAlch.setText("Walk alching?");
- walkAlch.addActionListener(new ActionListener(){
- @Override
- public void actionPerformed(ActionEvent e) {
- if (walkAlch.isSelected()) {
- walkTimeLabel.setVisible(true);
- walkMin.setVisible(true);
- walkMax.setVisible(true);
- to.setVisible(true);
- }
- else {
- walkTimeLabel.setVisible(false);
- walkMin.setVisible(false);
- walkMax.setVisible(false);
- to.setVisible(false);
- }
- }
- });
- mainTab.add(walkMin);
- mainTab.add(to);
- mainTab.add(walkMax);
- mainTab.add(walkAlch);
- startButton = new JButton();
- startButton.setLocation(250, 400);
- startButton.setSize(100, 50);
- startButton.setText("Start!");
- startButton.addActionListener(new ActionListener(){
- @Override
- public void actionPerformed(ActionEvent e) {
- alcher.sendValues(walkAlch.isSelected() ? true : false,
- walkAlch.isSelected() ? Integer.parseInt(walkMin.getText()) : 0,
- walkAlch.isSelected() ? Integer.parseInt(walkMax.getText()) : 0,
- itemName.getText());
- alcher.GUI_COMPLETE = true;
- }
- });
- mainTab.add(startButton);
- main.add(mainTab);
- antiban = new JPanel();
- antiban.setName("Antiban");
- antiban.setLayout(new GridLayout(10,10));
- preformXp = new JCheckBox("Preform xp check? ");
- preformXp.setLocation(20, 40);
- preformXp.setVisible(true);
- preformCamera = new JCheckBox("Preform camera movements? ");
- preformCamera.setLocation(20, 80);
- preformCamera.setVisible(true);
- preformClan = new JCheckBox("Join random chat channels? ");
- preformClan.setLocation(20, 120);
- preformClan.setVisible(true);
- preformPm = new JCheckBox("Preform random pms? ");
- preformPm.setLocation(20, 160);
- preformPm.setVisible(true);
- preformFriendsCheck = new JCheckBox("Preform friends check? ");
- preformFriendsCheck.setLocation(20, 200);
- preformFriendsCheck.setVisible(true);
- abanFreq = new JLabel("Antiban frequency (in seconds): ");
- //abanFreq.setLocation(20, 20);
- abanFreq.setVisible(true);
- freqMin = new JTextField(5);
- freqMin.setVisible(true);
- freqMax = new JTextField(5);
- freqMax.setVisible(true);
- JLabel to2 = new JLabel("to: ");
- to2.setVisible(true);
- antiban.add(preformXp);
- antiban.add(preformCamera);
- antiban.add(preformClan);
- antiban.add(preformPm);
- antiban.add(preformFriendsCheck);
- antiban.add(abanFreq);
- antiban.add(freqMin);
- antiban.add(to2);
- antiban.add(freqMax);
- main.addTab("Antiban", antiban);
- add(main);
- setLocationRelativeTo(null);
- pack();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement