Jump to content
Frequently Asked Questions
  • Are you not able to open the client? Try following our getting started guide
  • Still not working? Try downloading and running JarFix
  • Help! My bot doesn't do anything! Enable fresh start in client settings and restart the client
  • How to purchase with PayPal/OSRS/Crypto gold? You can purchase vouchers from other users
  • Script Review


    Eclipseop

    Recommended Posts

    hey guz im gonna review ur scripts

     

    plz giv them 2 me 4 free

     

    i will rate honestly

     

    i will not rate scripts i also have (so im not gonna review anything LOL)

     

    i am doing this 2 better the repo

     

    gl hf

     

    -Eclipseop :)

    Link to comment
    Share on other sites

    Hello fine script reviewer I have lent you a phenomenal script that does anything that your heart could desire (Only if your heart desires catching catching some kinds of fish). Now make haste little Otter friend.

    Link to comment
    Share on other sites

    • 4 weeks later...

    can u review my code

    public class TaskPanel extends JPanel {
    
    	private static ArrayList<BuyableItem> queue = new ArrayList<>();
    
    	public static ArrayList<BuyableItem> getQueue() {
    		return queue;
    	}
    
    	public TaskPanel() {
    		DefaultListModel<BuyableItem> listModel = new DefaultListModel<>();
    
    		JList<BuyableItem> list = new JList<>(listModel);
    		JScrollPane listScroller = new JScrollPane(list);
    
    		JButton addButton = new JButton("Add Item");
    		JButton removeButton = new JButton("Remove Selected Item");
    		JButton clearListButton = new JButton("Clear Queue");
    
    		addButton.setFocusPainted(false);
    		removeButton.setFocusPainted(false);
    		clearListButton.setFocusPainted(false);
    
    		addButton.addActionListener(new ActionListener() {
    			@Override
    			public void actionPerformed(ActionEvent e) {
    				BuyableItem item = (BuyableItem) JOptionPane.showInputDialog(null, "Select an item",
    						"Select an item", JOptionPane.PLAIN_MESSAGE, null, BuyableItem.values(), BuyableItem.values()
    								[0]);
    
    				listModel.addElement(item);
    				queue.add(item);
    			}
    		});
    
    		removeButton.addActionListener(new ActionListener() {
    			@Override
    			public void actionPerformed(ActionEvent e) {
    				int[] selected = list.getSelectedIndices();
    				if (selected.length > 0) {
    					for (int i : selected) {
    						listModel.remove(i);
    						queue.remove(i);
    					}
    				}
    			}
    		});
    
    		clearListButton.addActionListener(new ActionListener() {
    			@Override
    			public void actionPerformed(ActionEvent e) {
    				listModel.clear();
    				queue.clear();
    			}
    		});
    
    		JPanel buttonPanel = new JPanel(new GridLayout(3, 1));
    
    		buttonPanel.add(addButton);
    		buttonPanel.add(removeButton);
    		buttonPanel.add(clearListButton);
    
    		setLayout(new BorderLayout());
    
    		add(listScroller, BorderLayout.CENTER);
    		add(buttonPanel, BorderLayout.EAST);
    	}
    }
    
    Link to comment
    Share on other sites

    Archived

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

    ×
    ×
    • Create New...

    Important Information

    We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.