Jump to content
Parabot - Bot for Ikov, DreamScape, SoulPlay, RuneWild, and more

Dane

Coding Legend
  • Content Count

    222
  • Joined

  • Last visited

  • Days Won

    3
  • Feedback

    0%

Dane last won the day on May 11 2013

Dane had the most liked content!

About Dane

  • Rank
    Member

Profile Information

  • Gender
    Male

Recent Profile Visitors

3,636 profile views
  1. Dane

    Hi

    user id 5 hi cringe on my friend hola
  2. Let's break this conversation down. You start off giving your own form of constructive advice. He denies your suggestion politely, then you insult the 'source' being used. Looked for someone to point your finger at ("Idk who chose to use it"), and gave another suggestion. Which he again patiently and politely replies in denial. You're obviously insulted by this point for some strange psychotic reason, then use profanity to express the severity of your emotions towards his response. At this point I'm positive he's not interested in anything you have to say, and I'm surprised you weren't blocked right here. For a second you try to set back up some good grounds, but wreck it by using profanity again and insulting. He's dealt with many people like yourself before and has been training his douche defense skill. Right here is where he goes from level 98 to 99. gz You, unable to form a coherent sentence, try to quickly scramble words together in retaliation to his patience. He replies calmly ensuring your demands even after all of this social abuse he's endured. I'm done reading this. You have to be mental to make a thread like this. I hope this is a dumb joke.
  3. Dane

    /*REMOVED*/

    As leader of the /*REMOVED*/tians, I insist you cease and desist your lands n- jk why does every1 care so much please stfu
  4. can u stop posting off topic in threads ty

  5. How is this near perfect tile walking though? With the information you've provided it would only work if the minimap is locked. Also you're getting the coordinates by reading text on the screen.
  6. Dane

    Creating "GUI's"

    package org.parabot.dane.example; import java.awt.Dimension; import java.awt.Toolkit; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JOptionPane; import javax.swing.JPanel; import javax.swing.JTabbedPane; import javax.swing.JTextField; import javax.swing.UIManager; public class JFrameExample extends JFrame implements ActionListener { JPanel panel; JTextField field; JButton button; JLabel label; JTabbedPane pane; JPanel[] panePanels; public static void main(String[] arguments) { new JFrameExample(); } public JFrameExample() { // Self explanatory this.setTitle("Example"); this.setResizable(false); // Set the close operation to dispose so we don't have to use a // WindowListener for the windowClosing event. this.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); // Now we're going to add components to the frame. It's important you do // this before you pack so the pack method works properly. this.panel = new JPanel(); // The reason why the size of this panel is important is because it will // be the exact size of the inside of the frame. // For instance, if you set the preferred size of the frame itself to // 256, 256; the actual space inside the frame for contents will be less // due to the frames insets. (The surrounding frame/ui of the frame) this.panel.setPreferredSize(new Dimension(256, 256)); // We're setting the layout to null so we have free control of where // components go within it. (It's just easier that way in my opinion.) this.panel.setLayout(null); // It's time to add components to the JPanel. this.field = new JTextField("I'm a field!"); // For inner components, we only need setBounds because it's much // smaller than what you'd usually do, and there's no layout anyway so // we can freely position and size components. this.field.setBounds(4, 4, 248, 24); // We've setup the field, now we're just going to add it to the JPanel. this.panel.add(this.field); this.label = new JLabel("Click it. ->"); this.label.setBounds(106, 32, 96, 24); this.panel.add(this.label); this.button = new JButton("I'm a button!"); this.button.setToolTipText("You should click me."); this.button.setBounds(256 - 100, 32, 96, 24); // Now that we've added two useless things, we can go ahead and show you // how to use a JTabbedPane. // JTabbedPane's are pretty useful if you want to put categorized stuff // into a singular space. this.pane = new JTabbedPane(); this.pane.setBounds(4, 64, 248, 256 - 68); // We're going to add a bunch of blank tabs. The null parameter can be // supplied a Component, such as a JPanel. That should be a good enough // explanation for you. this.pane.addTab("Tab 1", null); this.pane.addTab("Tab 2", null); this.pane.addTab("Tab 3", null); this.panel.add(this.pane); // This button is going to have an action when you click it, so we'll // add an action listener to it and give it a command name. // We can use 'this' as the action listener, since it implements // ActionListener. this.button.addActionListener(this); // By default, the action command is the same as the caption. so it // would've been "I'm a button!" if we don't change it. // These should always be unique unless you want more than one thing // doing the same action. this.button.setActionCommand("ButtonAction"); this.panel.add(this.button); // Setting the location of the panel isn't nessecary because it's going // to be the main content panel anyway. // So we just add it to the JFrame. this.add(panel); // Pack the frame to fit the window to its contants, rather than give // the window a specific size. this.pack(); // Center the frame on the screen. // It's important we do this after we pack because then we'll have a // width and size to go off of. (e.g; getWidth()/getHeight()) Dimension screen = Toolkit.getDefaultToolkit().getScreenSize(); this.setLocation((screen.width - this.getWidth()) / 2, (screen.height - this.getHeight()) / 2); // If you don't want it centered, you could always set locatoin by // platform. // this.setLocationByPlatform(true); // Since we're all done, show the window. this.setVisible(true); } @Override public void actionPerformed(ActionEvent e) { String command = e.getActionCommand(); // I like to use switch statements for my ActionListeners because I // usually have a fairly abundant amount of commands. // Switch statements are recommended when there are 3 or more actual // values it could have. So it's not always neccesary. switch (command) { case "ButtonAction": { JOptionPane.showMessageDialog(this, "Field's Text: "" + this.field.getText() + '"', "Message", JOptionPane.WARNING_MESSAGE, null); break; } default: { System.out.println("Unknown action command: " + command + '.'); } } } @Override public void dispose() { if (JOptionPane.showConfirmDialog(this, "Are you sure you'd like to close this window?", "Select an Option", JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, null) == JOptionPane.OK_OPTION) { // INFO: You could do extra stuff here, in-case you plan on having // things happen when the window is closed. super.dispose(); } } private static final long serialVersionUID = 1577442436026299722L; }
×
×
  • Create New...