Jump to content

Archived

This topic is now archived and is closed to further replies.

Regex

Free GUIs

Recommended Posts

Hay guys i've noticed that the quality of GUIs on the site is appalling and people are using gui builders for extremely basic things, i am now offering to make GUIs for ANYONE for FREE!

simply list below with what you want on it and i will make the GUI.

regards, unix

Share this post


Link to post
Share on other sites

im on it :P

 

finished:

 

import org.parabot.api.methods.Inventory;
import org.parabot.api.wrappers.Item;

import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.Random;

/**
 * Created with IntelliJ IDEA.
 * User: David
 * Date: 28/03/13
 * Time: 01:31
 * To change this template use File | Settings | File Templates.
 */
public class Setup extends JFrame implements ActionListener {

    JPanel basePanel;
    JPanel buttonPanel;
    JPanel contentPanel;
    JButton start;
    JButton loadInvy;
    JTextField id;
    JLabel ud;

    inventory invy;
    static boolean open = false;

    public Setup() {
        basePanel = new JPanel();
        buttonPanel = new JPanel();
        contentPanel = new JPanel();
        start = new JButton("Start Script");
        loadInvy = new JButton("Load Inventory");
        id = new JTextField();
        id.setPreferredSize(new Dimension(25, 20));
        ud = new JLabel("Usable Id:");
        start.addActionListener(this);
        loadInvy.addActionListener(this);

        contentPanel.add(ud, BorderLayout.LINE_START);
        contentPanel.add(id, BorderLayout.LINE_END);

        buttonPanel.add(start, BorderLayout.PAGE_START);
        buttonPanel.add(loadInvy, BorderLayout.PAGE_END);

        add(contentPanel, BorderLayout.PAGE_START);
        add(buttonPanel, BorderLayout.PAGE_END);

        setDefaultCloseOperation(DISPOSE_ON_CLOSE);
        setResizable(true);
        pack();
        setVisible(true);
    }

    @Override
    public void actionPerformed(ActionEvent e) {
        Object s = e.getSource();
        if (s.equals(loadInvy)) {
            if (open) {
                JOptionPane.showMessageDialog(null, "Inventory Viewer already open!");
                return;
            }
            invy = new inventory(id);
            invy.setVisible(true);
        } else if (s.equals(start)) {
            //DO YOUR START SHIT
            if (open) {
                invy.dispose();
            }
            dispose();
        }
    }


    private class inventory extends JFrame implements ActionListener {
        JList list;
        DefaultListModel<String> model;
        JButton choose;
        JButton refresh;
        JPanel buttonPanel;
        JPanel listPanel;

        JTextField source;

        public inventory(JTextField field) {
            list = new JList();
            model = new DefaultListModel<String>();
            list.setModel(model);
            choose = new JButton("Use Item");
            choose.addActionListener(this);
            refresh = new JButton("Refresh");
            refresh.addActionListener(this);
            source = field;

            list.setPreferredSize(new Dimension(180, 225));

            listPanel = new JPanel();
            buttonPanel = new JPanel();

            listPanel.add(list, BorderLayout.CENTER);
            buttonPanel.add(choose, BorderLayout.WEST);
            buttonPanel.add(refresh, BorderLayout.EAST);
            model.addElement("LOLOLOL");

            add(listPanel, BorderLayout.NORTH);
            add(buttonPanel, BorderLayout.SOUTH);

            setDefaultCloseOperation(DISPOSE_ON_CLOSE);
            setResizable(false);
            setPreferredSize(new Dimension(200, 300));
            pack();
        }

        @Override
        public void actionPerformed(ActionEvent e) {
            Object s = e.getSource();
            if (s.equals(choose)) {
                source.setText(Integer.toString(Inventory.getItems()[list.getSelectedIndex()].getId()));
                source.setText(model.getElementAt(list.getSelectedIndex()+1));
                Setup.open = false;
                dispose();
            } else if (s.equals(refresh)) {
                model.clear();
                for (Item i : Inventory.getItems()) {
                    model.addElement(i.getDef().getName() + " : " + i.getId());
                }
            }
        }
    }

    public static void main(String[] args) {
        new Setup();
    }

}

Share this post


Link to post
Share on other sites

Title - JSP AIO Herblore Pro

Checkboxes: Don't Make Potions(Will make unfinished potions and clean herbs), Leach Slayer Points(Will leach slayer points from some of the most popular cc's if they are currently active and are in world 1)

Share this post


Link to post
Share on other sites

Title - JSP AIO Herblore Pro

Checkboxes: Don't Make Potions(Will make unfinished potions and clean herbs), Leach Slayer Points(Will leach slayer points from some of the most popular cc's if they are currently active and are in world 1)

il make this tomorrow for ya :)

Share this post


Link to post
Share on other sites

I have already got the code for a GUI,

but I want to add two more (tick boxes) how do I do that?

Or should I need to create a new gui?

Share this post


Link to post
Share on other sites

×