Skip to content

Commit

Permalink
Updated TransactionUI and removed unnecessary Test class
Browse files Browse the repository at this point in the history
  • Loading branch information
Gavin Li committed Feb 28, 2015
1 parent 1b7904d commit 1a897e9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 92 deletions.
86 changes: 0 additions & 86 deletions MerchantRPGCSE2102/src/view/Test.java

This file was deleted.

8 changes: 2 additions & 6 deletions MerchantRPGCSE2102/src/view/TransactionUI.java
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
package view;

import java.awt.BorderLayout;
import java.awt.EventQueue;

import javax.swing.BoxLayout;
import javax.swing.ComboBoxModel;
import javax.swing.JComboBox;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JRootPane;
import javax.swing.JSlider;
import javax.swing.border.EmptyBorder;
import javax.swing.JButton;
import javax.swing.JLabel;
Expand All @@ -26,9 +22,9 @@
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;

@SuppressWarnings("serial")
public class TransactionUI extends JFrame {

private static final ComboBoxModel[] Item = null;
private JPanel contentPane;
private static Transaction MASTER; //TransactionUI class will hold the instance of the Transaction that created it
private static boolean _inTransaction; //Prevents the user from making multiple transaction windows
Expand Down Expand Up @@ -144,7 +140,7 @@ public static void createBuyWindow()
frame.setContentPane(contentPane);
contentPane.setLayout(null);

String[] itemList = new String[MASTER.getTargetMerchant().getInventory().length]; //create a new array of strings with the length of the player's inventory //item that the player chooses from the combobox
String[] itemList = new String[MASTER.getTargetMerchant().getInventory().length]; //create a new array of strings with the length of the player's inventory
for(int i = 0; i < itemList.length; i++) //adds all the item names to the item list
{
itemList[i] = MASTER.getTargetMerchant().getInventory()[i].getItemName();
Expand Down

0 comments on commit 1a897e9

Please sign in to comment.