Advertisement
Guest User

Untitled

a guest
Sep 26th, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.47 KB | None | 0 0
  1. public class pGOPBuyerGUI extends javax.swing.JFrame {
  2.  
  3. /** This method is called from within the constructor to
  4. * initialize the form.
  5. * WARNING: Do NOT modify this code. The content of this method is
  6. * always regenerated by the Form Editor.
  7. */
  8. private void initComponents() {
  9.  
  10. jLabel1 = new javax.swing.JLabel();
  11. jLabel2 = new javax.swing.JLabel();
  12. jComboBox1 = new javax.swing.JComboBox();
  13. jLabel3 = new javax.swing.JLabel();
  14. jButton1 = new javax.swing.JButton();
  15.  
  16. setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
  17.  
  18. jLabel1.setFont(new java.awt.Font("Tahoma", 0, 24)); // NOI18N
  19. jLabel1.setText("pGOPBuyer");
  20.  
  21. jLabel2.setText("Buys anything at GOP.");
  22.  
  23. jComboBox1.setModel(new javax.swing.DefaultComboBoxModel(new String[] {
  24. "Water Talisman",
  25. "Air Talisman",
  26. "Fire Talisman",
  27. "Mind Talisman",
  28. "Body Talisman",
  29. "Earth Talisman",
  30. "Cosmic Talisman",
  31. "Chaos Talisman",
  32. "Law Talisman",
  33. "Nature Talisman",
  34. "Water Tele Tab",
  35. "Air Tele Tab",
  36. "Fire Tele Tab",
  37. "Mind Tele Tab",
  38. "Body Tele Tab",
  39. "Earth Tele Tab",
  40. "Cosmic Tele Tab",
  41. "Chaos Tele Tab",
  42. "Law Tele Tab",
  43. "Nature Tele Tab",
  44. "Astral Tele Tab",
  45. "Death Tele Tab",
  46. "Blood Tele Tab",
  47. "RC Guild Tele Tab",
  48. "Blue RC Hat",
  49. "Blue RC Robe",
  50. "Blue RC Skirt",
  51. "Blue RC Gloves",
  52. "Yellow RC Hat",
  53. "Yellow RC Robe",
  54. "Yellow RC Skirt",
  55. "Yellow RC Gloves",
  56. "Green RC Hat",
  57. "Green RC Robe",
  58. "Green RC Skirt",
  59. "Green RC Gloves",
  60. "Rune Essence",
  61. "Pure Essence (Members Only)",
  62. "Staff" }));
  63.  
  64. jLabel3.setText("What to buy?");
  65.  
  66. jButton1.setText("Start");
  67. jButton1.addActionListener(new java.awt.event.ActionListener() {
  68. public void actionPerformed(java.awt.event.ActionEvent evt) {
  69. jButton1ActionPerformed(evt);
  70. }
  71. });
  72.  
  73. javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
  74. getContentPane().setLayout(layout);
  75. layout.setHorizontalGroup(
  76. layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  77. .addGroup(layout.createSequentialGroup()
  78. .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  79. .addGroup(layout.createSequentialGroup()
  80. .addGap(125, 125, 125)
  81. .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  82. .addComponent(jLabel1)
  83. .addGroup(layout.createSequentialGroup()
  84. .addGap(10, 10, 10)
  85. .addComponent(jLabel2))))
  86. .addGroup(layout.createSequentialGroup()
  87. .addGap(156, 156, 156)
  88. .addComponent(jLabel3)))
  89. .addContainerGap(155, Short.MAX_VALUE))
  90. .addGroup(layout.createSequentialGroup()
  91. .addGap(110, 110, 110)
  92. .addComponent(jComboBox1, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
  93. .addGap(122, 122, 122))
  94. .addComponent(jButton1, javax.swing.GroupLayout.DEFAULT_SIZE, 400, Short.MAX_VALUE)
  95. );
  96. layout.setVerticalGroup(
  97. layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  98. .addGroup(layout.createSequentialGroup()
  99. .addContainerGap()
  100. .addComponent(jLabel1)
  101. .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  102. .addComponent(jLabel2)
  103. .addGap(27, 27, 27)
  104. .addComponent(jLabel3)
  105. .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  106. .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
  107. .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 77, Short.MAX_VALUE)
  108. .addComponent(jButton1))
  109. );
  110.  
  111. pack();
  112. }// </editor-fold>
  113.  
  114. public pGOPBuyerGUI() {
  115. setDefaultCloseOperation(DISPOSE_ON_CLOSE);
  116. initComponents();
  117. }
  118.  
  119. private void jButton1ActionPerformed(ActionEvent e) {
  120. String chosen = jComboBox1.getSelectedItem().toString();
  121. if (chosen.equals(("Water Talisman"))){
  122. whatLoopToRun = 1;
  123. }
  124. else if (chosen.equals(("Air Talisman"))){
  125. whatLoopToRun = 2;
  126. }
  127. else if (chosen.equals(("Fire Talisman"))){
  128. whatLoopToRun = 3;
  129. }
  130. else if (chosen.equals(("Earth Talisman"))){
  131. whatLoopToRun = 4;
  132. }
  133. else if (chosen.equals(("Mind Talisman"))){
  134. whatLoopToRun = 5;
  135. }
  136. else if (chosen.equals(("Body Talisman"))){
  137. whatLoopToRun = 6;
  138. }
  139. else if (chosen.equals(("Cosmic Talisman"))){
  140. whatLoopToRun = 7;
  141. }
  142. else if (chosen.equals(("Chaos Talisman"))){
  143. whatLoopToRun = 8;
  144. }
  145. else if (chosen.equals(("Nature Talisman"))){
  146. whatLoopToRun = 9;
  147. }
  148. else if (chosen.equals(("Law Talisman"))){
  149. whatLoopToRun = 10;
  150. }
  151. else if (chosen.equals(("Water Tele Tab"))){
  152. whatLoopToRun = 11;
  153. }
  154. else if (chosen.equals(("Air Tele Tab"))){
  155. whatLoopToRun = 12;
  156. }
  157. else if (chosen.equals(("Fire Tele Tab"))){
  158. whatLoopToRun = 13;
  159. }
  160. else if (chosen.equals(("Mind Tele Tab"))){
  161. whatLoopToRun = 14;
  162. }
  163. else if (chosen.equals(("Body Tele Tab"))){
  164. whatLoopToRun = 15;
  165. }
  166. else if (chosen.equals(("Earth Tele Tab"))){
  167. whatLoopToRun = 16;
  168. }
  169. else if (chosen.equals(("Cosmic Tele Tab"))){
  170. whatLoopToRun = 17;
  171. }
  172. else if (chosen.equals(("Chaos Tele Tab"))){
  173. whatLoopToRun = 18;
  174. }
  175. else if (chosen.equals(("Law Tele Tab"))){
  176. whatLoopToRun = 19;
  177. }
  178. else if (chosen.equals(("Nature Tele Tab"))){
  179. whatLoopToRun = 20;
  180. }
  181. else if (chosen.equals(("Astral Tele Tab"))){
  182. whatLoopToRun = 21;
  183. }
  184. else if (chosen.equals(("Death Tele Tab"))){
  185. whatLoopToRun = 22;
  186. }
  187. else if (chosen.equals(("Blood Tele Tab"))){
  188. whatLoopToRun = 23;
  189. }
  190. else if (chosen.equals(("RC Guild Tele Tab"))){
  191. whatLoopToRun = 24;
  192. }
  193. else if (chosen.equals(("Blue RC Hat"))){
  194. whatLoopToRun = 25;
  195. }
  196. else if (chosen.equals(("Blue RC Robe"))){
  197. whatLoopToRun = 26;
  198. }
  199. else if (chosen.equals(("Blue RC Skirt"))){
  200. whatLoopToRun = 27;
  201. }
  202. else if (chosen.equals(("Blue RC Gloves"))){
  203. whatLoopToRun = 28;
  204. }
  205. else if (chosen.equals(("Yellow RC Hat"))){
  206. whatLoopToRun = 29;
  207. }
  208. else if (chosen.equals(("Yellow RC Robe"))){
  209. whatLoopToRun = 30;
  210. }
  211. else if (chosen.equals(("Yellow RC Skirt"))){
  212. whatLoopToRun = 31;
  213. }
  214. else if (chosen.equals(("Yellow RC Gloves"))){
  215. whatLoopToRun = 32;
  216. }
  217. else if (chosen.equals(("Green RC Hat"))){
  218. whatLoopToRun = 33;
  219. }
  220. else if (chosen.equals(("Green RC Robe"))){
  221. whatLoopToRun = 34;
  222. }
  223. else if (chosen.equals(("Green RC Skirt"))){
  224. whatLoopToRun = 35;
  225. }
  226. else if (chosen.equals(("Green RC Gloves"))){
  227. whatLoopToRun = 36;
  228. }
  229. else if (chosen.equals(("Rune Essence"))){
  230. whatLoopToRun = 37;
  231. }
  232. else if (chosen.equals(("Pure Essence (Members Only)"))){
  233. whatLoopToRun = 38;
  234. }
  235. else if (chosen.equals(("Staff"))){
  236. whatLoopToRun = 39;
  237. }
  238. dispose();
  239. }
  240.  
  241. // Variables declaration - do not modify
  242. private javax.swing.JButton jButton1;
  243. private javax.swing.JComboBox jComboBox1;
  244. private javax.swing.JLabel jLabel1;
  245. private javax.swing.JLabel jLabel2;
  246. private javax.swing.JLabel jLabel3;
  247. // End of variables declaration
  248. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement