Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.awt.*;
- import java.awt.event.*;
- import javax.swing.*;
- import com.jgoodies.forms.factories.*;
- import com.jgoodies.forms.layout.*;
- /*
- * Created by JFormDesigner on Tue Sep 06 18:37:16 CDT 2011
- */
- /**
- * @author Tim
- */
- public class gui extends JFrame {
- public gui() {
- initComponents();
- }
- private void button1ActionPerformed(ActionEvent e) {
- //Get food id
- tempfoodID = textField1.getText();
- Vars.FoodID = Integer.parseInt(tempfoodID);
- //Check for Revenant lvl
- if (comboBox1.equals("Easy")){
- Vars.RevLvl = 1;
- }else if (comboBox1.equals("Medium")){
- Vars.RevLvl = 2;
- }else if (comboBox1.equals("Hard")){
- Vars.RevLvl = 3;
- }else Vars.RevLvl = 2;
- //Check for Repeling
- if (comboBox2.equals("No")){
- Vars.BraceRepel = false;
- }else if (comboBox2.equals("Yes")){
- Vars.BraceRepel = true;
- }else Vars.BraceRepel = false;
- //Check Banking method
- if (comboBox3.equals("Walk")){
- Vars.Banking = 1;
- }else if (comboBox3.equals("Glory")){
- Vars.Banking = 2;
- }else if (comboBox3.equals("Varrock Tab")){
- Vars.Banking = 3;
- }else Vars.Banking = 1;
- dispose();
- }
- private void initComponents() {
- // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents
- // Generated using JFormDesigner Evaluation license - Tim Christensen
- label1 = new JLabel();
- textField1 = new JTextField();
- label2 = new JLabel();
- comboBox1 = new JComboBox();
- label3 = new JLabel();
- comboBox2 = new JComboBox();
- label4 = new JLabel();
- comboBox3 = new JComboBox();
- button1 = new JButton();
- //======== this ========
- setTitle("Thunder Revenants");
- Container contentPane = getContentPane();
- contentPane.setLayout(new FormLayout(
- "4*(default, $lcgap), 19dlu",
- "5*(default, $lgap), default"));
- //---- label1 ----
- label1.setText("Food ID: ");
- contentPane.add(label1, CC.xy(3, 3));
- contentPane.add(textField1, CC.xy(7, 3));
- //---- label2 ----
- label2.setText("Revenant Lvl:");
- contentPane.add(label2, CC.xy(3, 5));
- //---- comboBox1 ----
- comboBox1.setModel(new DefaultComboBoxModel(new String[] {
- "Easy",
- "Medium",
- "Hard"
- }));
- contentPane.add(comboBox1, CC.xy(7, 5));
- //---- label3 ----
- label3.setText("Use Brace?:");
- contentPane.add(label3, CC.xy(3, 7));
- //---- comboBox2 ----
- comboBox2.setModel(new DefaultComboBoxModel(new String[] {
- "Yes",
- "No"
- }));
- contentPane.add(comboBox2, CC.xy(7, 7));
- //---- label4 ----
- label4.setText("Bank Method:");
- contentPane.add(label4, CC.xy(3, 9));
- //---- comboBox3 ----
- comboBox3.setModel(new DefaultComboBoxModel(new String[] {
- "Walk",
- "Glory",
- "Varrock Tab"
- }));
- contentPane.add(comboBox3, CC.xy(7, 9));
- //---- button1 ----
- button1.setText("Start");
- button1.addActionListener(new ActionListener() {
- @Override
- public void actionPerformed(ActionEvent e) {
- button1ActionPerformed(e);
- }
- });
- contentPane.add(button1, CC.xy(5, 11));
- 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 - Tim Christensen
- private JLabel label1;
- private JTextField textField1;
- private JLabel label2;
- private JComboBox comboBox1;
- private JLabel label3;
- private JComboBox comboBox2;
- private JLabel label4;
- private JComboBox comboBox3;
- private JButton button1;
- // JFormDesigner - End of variables declaration //GEN-END:variables
- }
Add Comment
Please, Sign In to add comment