diff --git a/Order Processor/.classpath b/Order Processor/.classpath
new file mode 100644
index 0000000..c04c811
--- /dev/null
+++ b/Order Processor/.classpath
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
diff --git a/Order Processor/.project b/Order Processor/.project
new file mode 100644
index 0000000..25a2c47
--- /dev/null
+++ b/Order Processor/.project
@@ -0,0 +1,17 @@
+
+
+ Order Processor
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/Order Processor/.settings/org.eclipse.jdt.core.prefs b/Order Processor/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..81e689b
--- /dev/null
+++ b/Order Processor/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,12 @@
+#Sun Nov 21 20:19:35 EST 2010
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
diff --git a/Order Processor/forms-1.3.0-src.zip b/Order Processor/forms-1.3.0-src.zip
new file mode 100644
index 0000000..b7673af
Binary files /dev/null and b/Order Processor/forms-1.3.0-src.zip differ
diff --git a/Order Processor/forms-1.3.0.jar b/Order Processor/forms-1.3.0.jar
new file mode 100644
index 0000000..e76ad83
Binary files /dev/null and b/Order Processor/forms-1.3.0.jar differ
diff --git a/Order Processor/miglayout-src.zip b/Order Processor/miglayout-src.zip
new file mode 100644
index 0000000..f5b97a5
Binary files /dev/null and b/Order Processor/miglayout-src.zip differ
diff --git a/Order Processor/miglayout15-swing.jar b/Order Processor/miglayout15-swing.jar
new file mode 100644
index 0000000..9b88362
Binary files /dev/null and b/Order Processor/miglayout15-swing.jar differ
diff --git a/Order Processor/src/com/TwentyCodes/java/OrderProcessor/Date.java b/Order Processor/src/com/TwentyCodes/java/OrderProcessor/Date.java
new file mode 100644
index 0000000..c29b006
--- /dev/null
+++ b/Order Processor/src/com/TwentyCodes/java/OrderProcessor/Date.java
@@ -0,0 +1,95 @@
+/**
+ * Date.java
+ * @date Jan 2, 2011
+ * @author ricky barrette
+ * @author Twenty Codes, LLC
+ */
+package com.TwentyCodes.java.OrderProcessor;
+
+/**
+ * A Date object that represents a specific date and time
+ * @author ricky barrette
+ */
+public class Date implements Comparable{
+
+ private int mHour;
+ private int mMinute;
+ private int mSecond;
+ private int mMonth;
+ private int mDay;
+ private int mYear;
+
+ /**
+ * Creates a new Date from a string.
+ * The string format will be 2010-12-30 22:24:08
+ * @param time
+ * @author ricky barrette
+ * @throws InvalidDateFormatException
+ */
+ public Date(String newDate) throws InvalidDateFormatException {
+ String[] parts = newDate.split(" ");
+ String[] date = parts[0].split("-");
+ String[] time = parts[1].split(":");
+ try {
+ this.mYear = Integer.parseInt(removeFirstChar(date[0]));
+ this.mDay = Integer.parseInt(date[2]);
+ this.mMonth = Integer.parseInt(date[1]);
+ this.mHour = Integer.parseInt(time[0]);
+ this.mMinute = Integer.parseInt(time[1]);
+ this.mSecond = Integer.parseInt(removeLastChar(time[2]));
+ } catch (NumberFormatException e) {
+ e.printStackTrace();
+ throw new InvalidDateFormatException();
+ }
+ }
+
+ /**
+ * removes the first string from a string
+ * @param s
+ * @return
+ * @author ricky barrette
+ */
+ private String removeFirstChar(String s) {
+ return s.substring(1,s.length());
+ }
+
+ /**
+ * removes the last char from a string
+ * @param s
+ * @return
+ * @author ricky barrette
+ */
+ private String removeLastChar(String s) {
+ return s.substring(0,s.length()-1);
+ }
+
+ /**
+ * returns a human readable string that reprensts this object
+ * (non-Javadoc)
+ * @see java.lang.Object#toString()
+ * @author ricky barrette
+ */
+ @Override
+ public String toString(){
+ return this.mHour +":"+ this.mMinute +":"+ this.mSecond +" "+ this.mMonth +"-"+ this.mDay +"-"+ this.mYear;
+ }
+
+ /**
+ * @return the total value of month + day + year + hour + minute + second
+ * @author ricky barrette
+ */
+ public long total(){
+ return this.mDay + this.mHour + this.mMinute + this.mMonth + this.mSecond + this.mYear;
+ }
+
+ @Override
+ public int compareTo(Date date) {
+ long thisTotal = this.total();
+ long thatTotal = date.total();
+ if(thisTotal < thatTotal)
+ return -1; //before
+ if(thisTotal > thatTotal)
+ return 1; //after
+ return 0;//equal
+ }
+}
\ No newline at end of file
diff --git a/Order Processor/src/com/TwentyCodes/java/OrderProcessor/InvalidDateFormatException.java b/Order Processor/src/com/TwentyCodes/java/OrderProcessor/InvalidDateFormatException.java
new file mode 100644
index 0000000..4edb202
--- /dev/null
+++ b/Order Processor/src/com/TwentyCodes/java/OrderProcessor/InvalidDateFormatException.java
@@ -0,0 +1,56 @@
+/**
+ * InvalidDateFormatException.java
+ * @date Jan 2, 2011
+ * @author ricky barrette
+ * @author Twenty Codes, LLC
+ */
+package com.TwentyCodes.java.OrderProcessor;
+
+/**
+ * A InvalidDateFormatException is an exception that represents the string for a Date was not formated properly
+ * @author ricky barrette
+ */
+public class InvalidDateFormatException extends Exception {
+
+ private static final long serialVersionUID = 5169762604232405408L;
+
+ /**
+ * Creates a new InvalidDateFormatException
+ * @author ricky barrette
+ */
+ public InvalidDateFormatException() {
+ // TODO Auto-generated constructor stub
+ }
+
+ /**
+ * Creates a new InvalidDateFormatException
+ * @param message
+ * @author ricky barrette
+ */
+ public InvalidDateFormatException(String message) {
+ super(message);
+ // TODO Auto-generated constructor stub
+ }
+
+ /**
+ * Creates a new InvalidDateFormatException
+ * @param cause
+ * @author ricky barrette
+ */
+ public InvalidDateFormatException(Throwable cause) {
+ super(cause);
+ // TODO Auto-generated constructor stub
+ }
+
+ /**
+ * Creates a new InvalidDateFormatException
+ * @param message
+ * @param cause
+ * @author ricky barrette
+ */
+ public InvalidDateFormatException(String message, Throwable cause) {
+ super(message, cause);
+ // TODO Auto-generated constructor stub
+ }
+
+}
diff --git a/Order Processor/src/com/TwentyCodes/java/OrderProcessor/Months.java b/Order Processor/src/com/TwentyCodes/java/OrderProcessor/Months.java
new file mode 100644
index 0000000..becfcd1
--- /dev/null
+++ b/Order Processor/src/com/TwentyCodes/java/OrderProcessor/Months.java
@@ -0,0 +1,17 @@
+/**
+ * Months.java
+ * @date Jan 2, 2011
+ * @author ricky barrette
+ * @author Twenty Codes, LLC
+ */
+package com.TwentyCodes.java.OrderProcessor;
+
+/**
+ * represents a time of year
+ * @author ricky barrette
+ */
+public enum Months {
+
+ JAN, FEB, MAR, APR, MAY, JUN, JUL, AUG, SEP, OCT, NOV, DEC, YEAR,
+
+}
diff --git a/Order Processor/src/com/TwentyCodes/java/OrderProcessor/Order.java b/Order Processor/src/com/TwentyCodes/java/OrderProcessor/Order.java
new file mode 100644
index 0000000..fd9e5b2
--- /dev/null
+++ b/Order Processor/src/com/TwentyCodes/java/OrderProcessor/Order.java
@@ -0,0 +1,262 @@
+/**
+ * @author Twenty Codes, LLC
+ * @author ricky barrette
+ * @date Nov 21, 2010
+ */
+
+package com.TwentyCodes.java.OrderProcessor;
+
+import com.TwentyCodes.java.OrderProcessor.UI.MainWindow;
+
+/**
+ * This class will represent a single order
+ * @author ricky barrette
+ */
+public class Order implements Comparable{
+
+ private String mItemName;
+ private long mGoogleOrderNumber;
+ private Date mOrderCreationDate;
+ private float mOrderAmount;
+ private float mAmountCharged;
+ private Status mFinancialStatus;
+ private Status mFulfillmentStatus;
+ private String mCustomerEmail;
+ private String mCustomerName;
+
+ /**
+ * Creates a new Order from a comma separated line from a *.csv file.
+ *
+ * Order ID,Merchant Order Number,Order Creation Date,Currency of Transaction,Order Amount,Amount Charged,Financial Status,Fulfillment Status,Link to Order,Total Tax,Total Shipping,Amount Refunded,Amount Charged Back,Chargeback Protection,Shipping Method,Email Marketing,Buyer Email Address,Buyer Name,Buyer Address 1,Buyer Address 2,Buyer City,Buyer State,Buyer Postal Code,Buyer Country,Buyer Phone Number,Tracking Data,Item 1 ID,Item 1 Name,Item 1 Description,Item 1 Price,Item 1 Quantity
+ *
+ * @param order
+ * @author ricky barrette
+ * @throws InvalidDateFormatException
+ */
+ public Order(String order) throws NumberFormatException, InvalidDateFormatException{
+ if(MainWindow.DEBUG)
+ System.out.println("parsing in order: "+ order);
+
+ String [] lineParts;
+ lineParts = order.split(",");
+
+ this.mGoogleOrderNumber = Long.parseLong(removeLastChar(lineParts[0].split(" ")[1]));
+ this.mOrderCreationDate = new Date(lineParts[2]);
+ this.mOrderAmount = Float.parseFloat(lineParts[4]);
+ this.mAmountCharged = Float.parseFloat(lineParts[5]);
+ this.mFinancialStatus = Status.parseStatus(lineParts[6]);
+ this.mFulfillmentStatus = Status.parseStatus(lineParts[7]);
+ this.mCustomerEmail = removeFistAndLastChar(lineParts[16]);
+ this.mCustomerName = removeFistAndLastChar(lineParts[17]);
+ this.mItemName = removeFistAndLastChar(lineParts[27]);
+
+ if (MainWindow.DEBUG)
+ System.out.println(this.toString());
+ }
+
+ /**
+ * removes the last char from a string
+ * @param s
+ * @return
+ * @author ricky barrette
+ */
+ private String removeLastChar(String s) {
+ return s.substring(0, s.length() - 1);
+ }
+
+ /**
+ * removes the first and last chars from a string
+ * @param s
+ * @return
+ * @author ricky barrette
+ */
+ private String removeFistAndLastChar(String s){
+ return s.substring(1, s.length()-1);
+ }
+
+ /**
+ * returns a human readable string that represnets this object
+ * (non-Javadoc)
+ * @see java.lang.Object#toString()
+ * @author ricky barrette
+ */
+ @Override
+ public String toString(){
+ return this.mGoogleOrderNumber +","+ this.mOrderCreationDate.toString() +","+ this.mItemName +","+ this.mOrderAmount +","+ this.mAmountCharged +","+ this.mFinancialStatus +","+ this.mFulfillmentStatus +","+ this.mCustomerName +","+ this.mCustomerEmail;
+ }
+
+ /**
+ * Compares orders by item name
+ * (non-Javadoc)
+ * @see java.lang.Comparable#compareTo(java.lang.Object)
+ * @author ricky barrette
+ */
+ @Override
+ public int compareTo(Order o) {
+ return this.mItemName.compareTo(o.getItemName());
+// return this.mOrderCreationDate.compareTo(o.getOrderCreationDate());
+ }
+
+
+ /**
+ * @param mItemName the mItemName to set
+ * @author ricky barrette
+ */
+ public void setItemName(String mItemName) {
+ this.mItemName = mItemName;
+ }
+
+
+ /**
+ * @return the mItemName
+ * @author ricky barrette
+ */
+ public String getItemName() {
+ return mItemName;
+ }
+
+
+ /**
+ * @param googleOrderNumber the mGoogleOrderNumber to set
+ * @author ricky barrette
+ */
+ public void setGoogleOrderNumber(long googleOrderNumber) {
+ this.mGoogleOrderNumber = googleOrderNumber;
+ }
+
+
+ /**
+ * @return the mGoogleOrderNumber
+ * @author ricky barrette
+ */
+ public long getGoogleOrderNumber() {
+ return mGoogleOrderNumber;
+ }
+
+
+ /**
+ * @param orderCreationDate the mOrderCreationDate to set
+ * @author ricky barrette
+ */
+ public void setOrderCreationDate(Date orderCreationDate) {
+ this.mOrderCreationDate = orderCreationDate;
+ }
+
+
+ /**
+ * @return the mOrderCreationDate
+ * @author ricky barrette
+ */
+ public Date getOrderCreationDate() {
+ return mOrderCreationDate;
+ }
+
+
+ /**
+ * @param orderAmount the mOrderAmount to set
+ * @author ricky barrette
+ */
+ public void setOrderAmount(float orderAmount) {
+ this.mOrderAmount = orderAmount;
+ }
+
+
+ /**
+ * @return the mOrderAmount
+ * @author ricky barrette
+ */
+ public float getOrderAmount() {
+ return mOrderAmount;
+ }
+
+
+ /**
+ * @param amountCharged the mAmountCharged to set
+ * @author ricky barrette
+ */
+ public void setAmountCharged(float amountCharged) {
+ this.mAmountCharged = amountCharged;
+ }
+
+
+ /**
+ * @return the mAmountCharged
+ * @author ricky barrette
+ */
+ public float getAmountCharged() {
+ return mAmountCharged;
+ }
+
+
+ /**
+ * @param financialStatus the mFinancialStatus to set
+ * @author ricky barrette
+ */
+ public void setFinancialStatus(Status financialStatus) {
+ this.mFinancialStatus = financialStatus;
+ }
+
+
+ /**
+ * @return the mFinancialStatus
+ * @author ricky barrette
+ */
+ public Status getFinancialStatus() {
+ return mFinancialStatus;
+ }
+
+
+ /**
+ * @param fulfillmentStatus the mFulfillmentStatus to set
+ * @author ricky barrette
+ */
+ public void setFulfillmentStatus(Status fulfillmentStatus) {
+ this.mFulfillmentStatus = fulfillmentStatus;
+ }
+
+
+ /**
+ * @return the mFulfillmentStatus
+ * @author ricky barrette
+ */
+ public Status getFulfillmentStatus() {
+ return mFulfillmentStatus;
+ }
+
+
+ /**
+ * @param customerEmail the mCustomerEmail to set
+ * @author ricky barrette
+ */
+ public void setCustomerEmail(String customerEmail) {
+ this.mCustomerEmail = customerEmail;
+ }
+
+
+ /**
+ * @return the mCustomerEmail
+ * @author ricky barrette
+ */
+ public String getCustomerEmail() {
+ return mCustomerEmail;
+ }
+
+
+ /**
+ * @param customerName the mCustomerName to set
+ * @author ricky barrette
+ */
+ public void setCustomerName(String customerName) {
+ this.mCustomerName = customerName;
+ }
+
+
+ /**
+ * @return the mCustomerName
+ * @author ricky barrette
+ */
+ public String getCustomerName() {
+ return mCustomerName;
+ }
+
+}
\ No newline at end of file
diff --git a/Order Processor/src/com/TwentyCodes/java/OrderProcessor/OrderDB.java b/Order Processor/src/com/TwentyCodes/java/OrderProcessor/OrderDB.java
new file mode 100644
index 0000000..3bfea64
--- /dev/null
+++ b/Order Processor/src/com/TwentyCodes/java/OrderProcessor/OrderDB.java
@@ -0,0 +1,128 @@
+/**
+ * @author Twenty Codess, LLC
+ * @author ricky barrette
+ * @data Dec 18, 2010
+ */
+
+package com.TwentyCodes.java.OrderProcessor;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Scanner;
+
+import com.TwentyCodes.java.OrderProcessor.UI.MainWindow;
+
+/**
+ * This class will be a account database
+ */
+public class OrderDB {
+
+ private ArrayList array;
+ private ProgressListener mListener;
+
+ /**
+ * Creates a new AccountDB
+ */
+ public OrderDB() {
+ array = new ArrayList(0);
+ }
+
+ /**
+ * returns a human readable string (non-Javadoc)
+ *
+ * @see java.lang.Object#toString()
+ */
+ @Override
+ public String toString() {
+ StringBuffer sb = new StringBuffer();
+ for (Order item : array)
+ sb.append(item.toString() + "\n");
+ return sb.toString();
+ }
+
+// /**
+// * saves the database to a text file
+// * @param file to be saved to
+// * @author ricky barrette
+// * @throws IOException
+// */
+// public void save(File file) throws IOException{
+// StringBuffer sb = new StringBuffer();
+// for(Order item : array)
+// sb.append(item.getBalance()+","+item.getOwner()+","+item.getAccount()+"\n");
+// FileOutputStream theFile = new FileOutputStream(file);
+// theFile.write(sb.toString().getBytes());
+// theFile.flush();
+// theFile.close();
+// }
+
+ /**
+ * loads the orders from the specified order
+ * @param file to be parsed
+ * @throws FileNotFoundException
+ * @author ricky barrette
+ */
+ public void load(File file) throws FileNotFoundException{
+ Scanner scan = new Scanner(file);
+ int line = 1;
+ while(scan.hasNextLine()){
+
+ if(mListener != null)
+ mListener.onProgressUpdate(line++);
+
+ if(MainWindow.DEBUG)
+ System.out.println("on line: "+ line);
+
+ try {
+ addOrder(new Order(scan.nextLine()));
+ } catch (OrderExistsException e) {
+ e.printStackTrace();
+ } catch (NumberFormatException e1){
+ e1.printStackTrace();
+ } catch (InvalidDateFormatException e2) {
+ // TODO Auto-generated catch block
+ e2.printStackTrace();
+ }
+ }
+ }
+
+ /**
+ * added the account to the database
+ *
+ * @param order
+ * @throws OrderExistsException
+ */
+ public void addOrder(Order order) throws OrderExistsException {
+ //TODO check if order exist already
+ array.add(order);
+ Collections.sort(array);
+ }
+
+ /**
+ * returns a list of orders that pertain any information being searched for
+ * @param text
+ * @return a list containing all possible orders
+ * @author ricky barrette
+ */
+ public ArrayList search(String text) {
+ ArrayList list = new ArrayList();
+ for(Order item : array){
+ if(item.getItemName().equalsIgnoreCase(text))
+ list.add(item);
+ }
+ return list;
+ }
+
+ /**
+ * sets a listener for db progress updates
+ * @param listener
+ * @author ricky barrette
+ */
+ public void setOnProgressListerner(ProgressListener listener) {
+ mListener = listener;
+ }
+
+
+}
\ No newline at end of file
diff --git a/Order Processor/src/com/TwentyCodes/java/OrderProcessor/OrderExistsException.java b/Order Processor/src/com/TwentyCodes/java/OrderProcessor/OrderExistsException.java
new file mode 100644
index 0000000..96bb4b6
--- /dev/null
+++ b/Order Processor/src/com/TwentyCodes/java/OrderProcessor/OrderExistsException.java
@@ -0,0 +1,56 @@
+/**
+ * @author Twenty Codes, LLC
+ * @author ricky barrette
+ * @date Dec 24, 2010
+ */
+
+package com.TwentyCodes.java.OrderProcessor;
+
+/**
+ *
+ * @author ricky barrette
+ */
+public class OrderExistsException extends Exception {
+
+ /**
+ * @author ricky barrette
+ */
+ private static final long serialVersionUID = 4605163237489852355L;
+
+ /**
+ * Creates a new AccountExistsException
+ * @author ricky barrette
+ */
+ public OrderExistsException() {
+ super();
+ }
+
+ /**
+ * Creates a new AccountExistsException
+ * @param arg0
+ * @author ricky barrette
+ */
+ public OrderExistsException(String arg0) {
+ super(arg0);
+ }
+
+ /**
+ * Creates a new AccountExistsException
+ * @param arg0
+ * @author ricky barrette
+ */
+ public OrderExistsException(Throwable arg0) {
+ super(arg0);
+ }
+
+ /**
+ * Creates a new AccountExistsException
+ * @param arg0
+ * @param arg1
+ * @author ricky barrette
+ */
+ public OrderExistsException(String arg0, Throwable arg1) {
+ super(arg0, arg1);
+ }
+
+}
diff --git a/Order Processor/src/com/TwentyCodes/java/OrderProcessor/ProgressListener.java b/Order Processor/src/com/TwentyCodes/java/OrderProcessor/ProgressListener.java
new file mode 100644
index 0000000..8097e98
--- /dev/null
+++ b/Order Processor/src/com/TwentyCodes/java/OrderProcessor/ProgressListener.java
@@ -0,0 +1,22 @@
+/**
+ * ProgressListener.java
+ * @date Jan 3, 2011
+ * @author ricky barrette
+ * @author Twenty Codes, LLC
+ */
+package com.TwentyCodes.java.OrderProcessor;
+
+/**
+ * A listener class that will be used to pass updates from the order DB to the client window
+ * @author ricky barrette
+ */
+public interface ProgressListener {
+
+ /**
+ * called when the progress has ben updated
+ * @param progress
+ * @author ricky barrette
+ */
+ public void onProgressUpdate(int progress);
+
+}
\ No newline at end of file
diff --git a/Order Processor/src/com/TwentyCodes/java/OrderProcessor/Status.java b/Order Processor/src/com/TwentyCodes/java/OrderProcessor/Status.java
new file mode 100644
index 0000000..9e4027c
--- /dev/null
+++ b/Order Processor/src/com/TwentyCodes/java/OrderProcessor/Status.java
@@ -0,0 +1,73 @@
+/**
+ * Status.java
+ * @date Jan 2, 2011
+ * @author ricky barrette
+ * @author Twenty Codes, LLC
+ */
+package com.TwentyCodes.java.OrderProcessor;
+
+import com.TwentyCodes.java.OrderProcessor.UI.MainWindow;
+
+/**
+ * This enum will represent statuses that are associated with an order
+ * @author ricky barrette
+ */
+public enum Status {
+
+ /**
+ * A financial status representing that the order has been charged to the customer
+ */
+ CHARGED,
+
+ /**
+ * A financial status representing that the order has been canceled by the customer
+ */
+ CANCELLED,
+
+
+ /**
+ * A financial status representing that the order has been canceled by google, most likely due to an invalid credit card
+ */
+ CANCELLED_BY_GOOGLE,
+
+ /**
+ * A fulfillment status representing that the order has been delivered to the customer
+ */
+ DELIVERED,
+
+ /**
+ * A fulfillment status representing that the order has been canceled, and will not be delivered to the customer
+ */
+ WILL_NOT_DELIVER;
+
+
+ /**
+ * Parses a string into a Status
+ * @param s
+ * @return the Status the represents the string or null if unparseable
+ * @author ricky barrette
+ */
+ public static Status parseStatus(String s){
+ if(MainWindow.DEBUG)
+ System.out.println("parsing status: "+ s);
+
+ if(s.equals("\""+ CHARGED.toString()+"\""))
+ return CHARGED;
+
+ if(s.equals("\""+ CANCELLED.toString()+"\""))
+ return CANCELLED;
+
+ if(s.equals("\""+ CANCELLED_BY_GOOGLE.toString()+"\""))
+ return CANCELLED_BY_GOOGLE;
+
+ if(s.equals("\""+ DELIVERED.toString()+"\""))
+ return DELIVERED;
+
+ if(s.equals("\""+ WILL_NOT_DELIVER.toString()+"\""))
+ return WILL_NOT_DELIVER;
+
+ return null;
+
+ }
+
+}
\ No newline at end of file
diff --git a/Order Processor/src/com/TwentyCodes/java/OrderProcessor/TextStyle.java b/Order Processor/src/com/TwentyCodes/java/OrderProcessor/TextStyle.java
new file mode 100644
index 0000000..7b4cd8c
--- /dev/null
+++ b/Order Processor/src/com/TwentyCodes/java/OrderProcessor/TextStyle.java
@@ -0,0 +1,17 @@
+/**
+ * Style.java
+ * @date Jan 2, 2011
+ * @author ricky barrette
+ * @author Twenty Codes, LLC
+ */
+package com.TwentyCodes.java.OrderProcessor;
+
+/**
+ *
+ * @author ricky barrette
+ */
+public enum TextStyle {
+
+ BOLD, ITALIC, REGULAR, RED, GREEN
+
+}
\ No newline at end of file
diff --git a/Order Processor/src/com/TwentyCodes/java/OrderProcessor/TransactionType.java b/Order Processor/src/com/TwentyCodes/java/OrderProcessor/TransactionType.java
new file mode 100644
index 0000000..abb5824
--- /dev/null
+++ b/Order Processor/src/com/TwentyCodes/java/OrderProcessor/TransactionType.java
@@ -0,0 +1,17 @@
+/**
+ * @author Twenty Codes, LLC
+ * @author ricky barrette
+ * @date Dec 22, 2010
+ */
+
+package com.TwentyCodes.java.OrderProcessor;
+
+/**
+ * this enum will represent trantions types
+ * @author ricky barrette
+ */
+public enum TransactionType {
+
+ DEPOSIT, WITHDRAW, CHARGE_FEE
+
+}
diff --git a/Order Processor/src/com/TwentyCodes/java/OrderProcessor/UI/GetStatsDialog.java b/Order Processor/src/com/TwentyCodes/java/OrderProcessor/UI/GetStatsDialog.java
new file mode 100644
index 0000000..425ac7d
--- /dev/null
+++ b/Order Processor/src/com/TwentyCodes/java/OrderProcessor/UI/GetStatsDialog.java
@@ -0,0 +1,271 @@
+/**
+ * GetStatsDialog.java
+ * @date Jan 2, 2010
+ * @author ricky barrette
+ * @author Twenty Codes, LLC
+ */
+package com.TwentyCodes.java.OrderProcessor.UI;
+
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+
+import javax.swing.ButtonGroup;
+import javax.swing.GroupLayout;
+import javax.swing.GroupLayout.Alignment;
+import javax.swing.JButton;
+import javax.swing.JFrame;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JRadioButton;
+import javax.swing.JTextField;
+import javax.swing.LayoutStyle.ComponentPlacement;
+import javax.swing.border.EmptyBorder;
+
+import com.TwentyCodes.java.OrderProcessor.Months;
+
+/**
+ * this will be a dialog for getting information about the stats the user is looking for
+ * @author ricky barrette
+ */
+public class GetStatsDialog extends JFrame implements ActionListener {
+
+
+ private static final long serialVersionUID = -8681149469926405790L;
+ private JPanel contentPane;
+ private JRadioButton mJan;
+ private JRadioButton mFeb;
+ private JRadioButton mMar;
+ private JRadioButton mApr;
+ private JRadioButton mJun;
+ private JRadioButton mJul;
+ private JRadioButton mAug;
+ private JRadioButton mSep;
+ private JRadioButton mNov;
+ private JRadioButton mDec;
+ private JRadioButton mYear;
+ private JRadioButton mMay;
+ private JRadioButton mOct;
+ private JTextField textField;
+ private JButton mOkButton;
+ private Months mTimeFrame = Months.JAN;
+
+ /**
+ * Create the frame.
+ */
+ public GetStatsDialog() {
+ setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
+ setBounds(100, 100, 260, 371);
+ contentPane = new JPanel();
+ contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
+
+ ButtonGroup group = new ButtonGroup();
+ mJan = new JRadioButton("Jan");
+ mFeb = new JRadioButton("Feb");
+ mMar = new JRadioButton("Mar");
+ mApr = new JRadioButton("Apr");
+ mMay = new JRadioButton("May");
+ mJun = new JRadioButton("Jun");
+ mJul = new JRadioButton("Jul");
+ mAug = new JRadioButton("Aug");
+ mSep = new JRadioButton("Sep");
+ mOct = new JRadioButton("Oct");
+ mNov = new JRadioButton("Nov");
+ mDec = new JRadioButton("Dec");
+ mYear = new JRadioButton("Year");
+
+ group.add(mJan);
+ group.add(mFeb);
+ group.add(mMar);
+ group.add(mApr);
+ group.add(mMay);
+ group.add(mJun);
+ group.add(mJul);
+ group.add(mAug);
+ group.add(mSep);
+ group.add(mOct);
+ group.add(mNov);
+ group.add(mDec);
+ group.add(mYear);
+
+ mJan.setSelected(true);
+
+ //Put the radio buttons in a column in a panel.
+ JPanel radioPanel = new JPanel();
+
+ mJan.addActionListener(this);
+ mFeb.addActionListener(this);
+ mMar.addActionListener(this);
+ mApr.addActionListener(this);
+ mMay.addActionListener(this);
+ mJun.addActionListener(this);
+ mJul.addActionListener(this);
+ mAug.addActionListener(this);
+ mSep.addActionListener(this);
+ mOct.addActionListener(this);
+ mNov.addActionListener(this);
+ mDec.addActionListener(this);
+ mYear.addActionListener(this);
+ setContentPane(contentPane);
+
+ JLabel lblTimeFrame = new JLabel("Time Frame");
+
+ JLabel lblApplicationName = new JLabel("Application Name");
+
+ textField = new JTextField();
+ textField.setColumns(10);
+
+ mOkButton = new JButton("Ok");
+ GroupLayout gl_contentPane = new GroupLayout(contentPane);
+ gl_contentPane.setHorizontalGroup(
+ gl_contentPane.createParallelGroup(Alignment.LEADING)
+ .addGroup(gl_contentPane.createSequentialGroup()
+ .addContainerGap()
+ .addGroup(gl_contentPane.createParallelGroup(Alignment.TRAILING)
+ .addGroup(gl_contentPane.createSequentialGroup()
+ .addGroup(gl_contentPane.createParallelGroup(Alignment.LEADING)
+ .addComponent(mOkButton, GroupLayout.PREFERRED_SIZE, 135, GroupLayout.PREFERRED_SIZE)
+ .addComponent(lblApplicationName))
+ .addPreferredGap(ComponentPlacement.RELATED))
+ .addComponent(textField))
+ .addGroup(gl_contentPane.createParallelGroup(Alignment.LEADING)
+ .addComponent(lblTimeFrame)
+ .addComponent(radioPanel, GroupLayout.PREFERRED_SIZE, 96, GroupLayout.PREFERRED_SIZE))
+ .addGap(164))
+ );
+ gl_contentPane.setVerticalGroup(
+ gl_contentPane.createParallelGroup(Alignment.LEADING)
+ .addGroup(gl_contentPane.createSequentialGroup()
+ .addGroup(gl_contentPane.createParallelGroup(Alignment.BASELINE)
+ .addComponent(lblTimeFrame)
+ .addComponent(lblApplicationName))
+ .addPreferredGap(ComponentPlacement.RELATED)
+ .addGroup(gl_contentPane.createParallelGroup(Alignment.LEADING, false)
+ .addComponent(radioPanel, GroupLayout.PREFERRED_SIZE, 306, GroupLayout.PREFERRED_SIZE)
+ .addGroup(Alignment.TRAILING, gl_contentPane.createSequentialGroup()
+ .addComponent(textField, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
+ .addPreferredGap(ComponentPlacement.RELATED, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+ .addComponent(mOkButton)))
+ .addContainerGap())
+ );
+ GroupLayout gl_radioPanel = new GroupLayout(radioPanel);
+ gl_radioPanel.setHorizontalGroup(
+ gl_radioPanel.createParallelGroup(Alignment.LEADING)
+ .addGroup(gl_radioPanel.createSequentialGroup()
+ .addContainerGap()
+ .addComponent(mDec)
+ .addContainerGap(45, Short.MAX_VALUE))
+ .addGroup(gl_radioPanel.createSequentialGroup()
+ .addGroup(gl_radioPanel.createParallelGroup(Alignment.TRAILING)
+ .addGroup(Alignment.LEADING, gl_radioPanel.createSequentialGroup()
+ .addContainerGap()
+ .addGroup(gl_radioPanel.createParallelGroup(Alignment.LEADING)
+ .addComponent(mJan)
+ .addComponent(mFeb)
+ .addComponent(mMar)
+ .addComponent(mApr)
+ .addComponent(mMay)
+ .addComponent(mJun)
+ .addComponent(mJul)
+ .addComponent(mAug)
+ .addComponent(mSep)
+ .addComponent(mOct)
+ .addComponent(mNov, GroupLayout.DEFAULT_SIZE, 57, Short.MAX_VALUE)))
+ .addGroup(Alignment.LEADING, gl_radioPanel.createSequentialGroup()
+ .addContainerGap()
+ .addComponent(mYear)))
+ .addGap(39))
+ );
+ gl_radioPanel.setVerticalGroup(
+ gl_radioPanel.createParallelGroup(Alignment.LEADING)
+ .addGroup(gl_radioPanel.createSequentialGroup()
+ .addComponent(mJan)
+ .addPreferredGap(ComponentPlacement.RELATED)
+ .addComponent(mFeb)
+ .addPreferredGap(ComponentPlacement.RELATED)
+ .addComponent(mMar)
+ .addPreferredGap(ComponentPlacement.RELATED)
+ .addComponent(mApr)
+ .addPreferredGap(ComponentPlacement.RELATED)
+ .addComponent(mMay)
+ .addPreferredGap(ComponentPlacement.RELATED)
+ .addComponent(mJun)
+ .addPreferredGap(ComponentPlacement.RELATED)
+ .addComponent(mJul)
+ .addPreferredGap(ComponentPlacement.RELATED)
+ .addComponent(mAug)
+ .addPreferredGap(ComponentPlacement.RELATED)
+ .addComponent(mSep)
+ .addPreferredGap(ComponentPlacement.RELATED)
+ .addComponent(mOct)
+ .addPreferredGap(ComponentPlacement.RELATED)
+ .addComponent(mNov)
+ .addPreferredGap(ComponentPlacement.RELATED)
+ .addComponent(mDec)
+ .addPreferredGap(ComponentPlacement.RELATED)
+ .addComponent(mYear)
+ .addGap(167))
+ );
+ radioPanel.setLayout(gl_radioPanel);
+ contentPane.setLayout(gl_contentPane);
+ }
+
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ if(e.getSource() == mJan){
+ mTimeFrame = Months.JAN;
+ }
+
+ if(e.getSource() == mFeb){
+ mTimeFrame = Months.FEB;
+ }
+
+ if(e.getSource() == mMar){
+ mTimeFrame = Months.MAR;
+ }
+
+ if(e.getSource() == mApr){
+ mTimeFrame = Months.APR;
+ }
+
+ if(e.getSource() == mMay){
+ mTimeFrame = Months.MAY;
+ }
+
+ if(e.getSource() == mJun){
+ mTimeFrame = Months.JUN;
+ }
+
+ if(e.getSource() == mJul){
+ mTimeFrame = Months.JUL;
+ }
+
+ if(e.getSource() == mAug){
+ mTimeFrame = Months.AUG;
+ }
+
+ if(e.getSource() == mSep){
+ mTimeFrame = Months.SEP;
+ }
+
+ if(e.getSource() == mOct){
+ mTimeFrame = Months.OCT;
+ }
+
+ if(e.getSource() == mNov){
+ mTimeFrame = Months.NOV;
+ }
+
+ if(e.getSource() == mDec){
+ mTimeFrame = Months.DEC;
+ }
+
+ if(e.getSource() == mYear){
+ mTimeFrame = Months.YEAR;
+ }
+
+ if(e.getSource() == mOkButton){
+
+ }
+
+ }
+}
diff --git a/Order Processor/src/com/TwentyCodes/java/OrderProcessor/UI/MainWindow.java b/Order Processor/src/com/TwentyCodes/java/OrderProcessor/UI/MainWindow.java
new file mode 100644
index 0000000..ce59491
--- /dev/null
+++ b/Order Processor/src/com/TwentyCodes/java/OrderProcessor/UI/MainWindow.java
@@ -0,0 +1,148 @@
+/**
+ * @author Twenty Codes, LLC
+ * @author ricky barrette
+ * @date Dec 18, 2010
+ */
+
+package com.TwentyCodes.java.OrderProcessor.UI;
+
+import java.awt.BorderLayout;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileReader;
+import java.io.IOException;
+import java.io.LineNumberReader;
+
+import javax.swing.JButton;
+import javax.swing.JFileChooser;
+import javax.swing.JFrame;
+import javax.swing.JPanel;
+import javax.swing.JProgressBar;
+
+import com.TwentyCodes.java.OrderProcessor.OrderDB;
+import com.TwentyCodes.java.OrderProcessor.ProgressListener;
+
+/**
+ * this is the main window and class of this application
+ */
+public class MainWindow extends JFrame implements ActionListener, ProgressListener{
+
+ private JButton mSearchButton;
+ private JButton mShowAllButton;
+ private JButton mLoadFileButton;
+ private JFileChooser fc;
+ public static OrderDB db;
+ private static final long serialVersionUID = 1841715561053331517L;
+ public static final boolean DEBUG = false;
+ private JProgressBar mProgressBar;
+
+ /**
+ * Creates a new MainWindow
+ * @author ricky barrette
+ */
+ public MainWindow() {
+ setTitle("Twenty Codes, LLC Order Database");
+ JPanel panel = new JPanel();
+
+ getContentPane().add(panel);
+ mShowAllButton = new JButton("Show All Orders");
+ mShowAllButton.addActionListener(this);
+ mSearchButton = new JButton("Search");
+
+ mSearchButton.addActionListener(this);
+ panel.add(mSearchButton, "cell 0 0,grow");
+ panel.add(mShowAllButton, "cell 0 0,alignx left,aligny top");
+ mLoadFileButton = new JButton("Load File");
+ mLoadFileButton.addActionListener(this);
+ panel.add(mLoadFileButton, "cell 0 0,alignx left,aligny top");
+
+ mProgressBar = new JProgressBar();
+ getContentPane().add(mProgressBar, BorderLayout.SOUTH);
+ setVisible(true);
+ pack();
+
+ db = new OrderDB();
+ fc = new JFileChooser();
+ fc.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);
+
+ db.setOnProgressListerner(this);
+ }
+
+ /**
+ * main method, called when the application starts
+ * @param args
+ */
+ public static void main(String[] args){
+ new MainWindow();
+ }
+
+ /**
+ * called when a button is clicked
+ * (non-Javadoc)
+ * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
+ */
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ if(e.getSource() == mShowAllButton){
+ new ShowAllDialog(db.toString());
+ }
+ if (e.getSource() == mSearchButton) {
+ new SearchDialog();
+ }
+
+ if(e.getSource() == mLoadFileButton){
+ try {
+ if(fc.showOpenDialog(MainWindow.this) == JFileChooser.APPROVE_OPTION)
+ mProgressBar.setIndeterminate(true);
+ mProgressBar.setString(fc.getSelectedFile().toString());
+ mProgressBar.setStringPainted(true);
+ mProgressBar.setMaximum(countLines(fc.getSelectedFile()));
+ db.load(fc.getSelectedFile());
+ pack();
+
+ } catch (FileNotFoundException e1) {
+ // TODO Auto-generated catch block
+ e1.printStackTrace();
+ } catch (IOException e2) {
+ // TODO Auto-generated catch block
+ e2.printStackTrace();
+ }
+ }
+ }
+
+ /**
+ * counts the number of lines in a file
+ * @param file to be read
+ * @return number of lines in a file
+ * @throws IOException
+ * @author ricky barrette
+ */
+ public int countLines(File file) throws IOException {
+ LineNumberReader reader = new LineNumberReader(new FileReader(file));
+ int cnt = 0;
+ String lineRead = "";
+ while ((lineRead = reader.readLine()) != null) {
+ }
+
+ cnt = reader.getLineNumber();
+ reader.close();
+ return cnt;
+ }
+
+
+ /**
+ * called then the progress of the order db is updated
+ * (non-Javadoc)
+ * @see com.TwentyCodes.java.OrderProcessor.ProgressListener#onProgressUpdate(int)
+ * @author ricky barrette
+ */
+ @Override
+ public void onProgressUpdate(int progress) {
+ if(mProgressBar.isIndeterminate())
+ mProgressBar.setIndeterminate(false);
+ mProgressBar.setValue(progress);
+ }
+
+}
\ No newline at end of file
diff --git a/Order Processor/src/com/TwentyCodes/java/OrderProcessor/UI/SearchDialog.java b/Order Processor/src/com/TwentyCodes/java/OrderProcessor/UI/SearchDialog.java
new file mode 100644
index 0000000..8a2da1e
--- /dev/null
+++ b/Order Processor/src/com/TwentyCodes/java/OrderProcessor/UI/SearchDialog.java
@@ -0,0 +1,164 @@
+/**
+ * @author Twenty Codes, LLC
+ * @author ricky barrette
+ * @data Dec 18, 2010
+ */
+
+package com.TwentyCodes.java.OrderProcessor.UI;
+
+import java.awt.BorderLayout;
+import java.awt.Color;
+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.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.JTextField;
+import javax.swing.JTextPane;
+import javax.swing.text.BadLocationException;
+import javax.swing.text.Style;
+import javax.swing.text.StyleConstants;
+import javax.swing.text.StyleContext;
+import javax.swing.text.StyledDocument;
+
+import com.TwentyCodes.java.OrderProcessor.Order;
+import com.TwentyCodes.java.OrderProcessor.Status;
+import com.TwentyCodes.java.OrderProcessor.TextStyle;
+
+/**
+ * This class will be the dialog that will ask the user for a specific make to show
+ */
+public class SearchDialog extends JFrame implements ActionListener {
+
+ private static final long serialVersionUID = 1750326106927701404L;
+ private JButton ok;
+ private JTextPane mOutput;
+ private JTextField textField;
+
+ /**
+ * Creates a new ShowAllMakeDialog
+ */
+ public SearchDialog() {
+ super();
+ setTitle("Search");
+
+ //create a JPanel to hold the text area and button
+ JPanel panel = new JPanel();
+ ok = new JButton("Ok");
+ JLabel label = new JLabel("Enter a Product name:");
+ ok.addActionListener(this);
+
+ //add the JPanel to the frame, and display
+ getContentPane().add(panel, BorderLayout.NORTH);
+
+ textField = new JTextField();
+ textField.setColumns(10);
+
+ panel.add(label);
+ panel.add(textField);
+ panel.add(ok);
+
+ JScrollPane scrollPane = new JScrollPane();
+ getContentPane().add(scrollPane, BorderLayout.CENTER);
+
+ mOutput = new JTextPane();
+ mOutput.setEditable(false);
+ scrollPane.setViewportView(mOutput);
+ pack();
+ setVisible(true);
+ }
+
+
+ /**
+ * (non-Javadoc)
+ * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
+ */
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ if (e.getSource() == ok) {
+ mOutput.setText(null);
+ float possible = 0;
+ float actual = 0;
+ int total = 0;
+ for(Order item : MainWindow.db.search(textField.getText())){
+
+ switch(item.getFinancialStatus()){
+ case CANCELLED:
+ updateTextPane(item.toString(), TextStyle.RED);
+ break;
+ case CANCELLED_BY_GOOGLE:
+ updateTextPane(item.toString(), TextStyle.RED);
+ break;
+ default:
+ updateTextPane(item.toString(), TextStyle.REGULAR);
+ }
+
+ possible = possible + item.getOrderAmount();
+ actual = actual + item.getAmountCharged();
+ if(item.getFulfillmentStatus() == Status.DELIVERED)
+ total++;
+ }
+
+ updateTextPane("Possible sales: $"+possible, TextStyle.BOLD);
+ updateTextPane("Actual sales: $"+actual, TextStyle.BOLD);
+ updateTextPane("Total sold: "+total, TextStyle.BOLD);
+
+ pack();
+ }
+ }
+
+ /**
+ * adds the folloing string to the textpane
+ * @param string
+ * @author ricky barrette
+ */
+ private void updateTextPane(String string, TextStyle style) {
+ String[] initString = {"\n"+ string };
+ String[] initStyles = { style.toString() };
+
+ StyledDocument doc = mOutput.getStyledDocument();
+ addStylesToDocument(doc);
+
+ // Load the text pane with styled text.
+ try {
+ for (int i = 0; i < initString.length; i++) {
+ doc.insertString(doc.getLength(), initString[i],
+ doc.getStyle(initStyles[i]));
+ }
+ } catch (BadLocationException ble) {
+ System.err.println("Couldn't insert initial text into text pane.");
+ }
+ mOutput.setDocument(doc);
+
+ }
+
+ /**
+ * adds supported styles to the document
+ * @param doc
+ * @author ricky barrette
+ */
+ protected void addStylesToDocument(StyledDocument doc) {
+ //Initialize some styles.
+ Style def = StyleContext.getDefaultStyleContext().getStyle(StyleContext.DEFAULT_STYLE);
+
+ Style regular = doc.addStyle("REGULAR", def);
+ StyleConstants.setFontFamily(def, "Arial");
+ StyleConstants.setFontSize(def, 14);
+
+ Style s = doc.addStyle("ITALIC", regular);
+ StyleConstants.setItalic(s, true);
+
+ s = doc.addStyle("BOLD", regular);
+ StyleConstants.setBold(s, true);
+
+ s = doc.addStyle("RED", regular);
+ StyleConstants.setForeground(s, Color.RED);
+
+ s = doc.addStyle("GREEN", regular);
+ StyleConstants.setForeground(s, Color.GREEN);
+ }
+
+}
diff --git a/Order Processor/src/com/TwentyCodes/java/OrderProcessor/UI/ShowAllDialog.java b/Order Processor/src/com/TwentyCodes/java/OrderProcessor/UI/ShowAllDialog.java
new file mode 100644
index 0000000..bcded9e
--- /dev/null
+++ b/Order Processor/src/com/TwentyCodes/java/OrderProcessor/UI/ShowAllDialog.java
@@ -0,0 +1,52 @@
+/**
+ * @author Twenty Codes, LLC
+ * @author ricky barrette
+ * @date Dec 18, 2010
+ */
+
+package com.TwentyCodes.java.OrderProcessor.UI;
+
+import java.awt.BorderLayout;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+
+import javax.swing.JButton;
+import javax.swing.JFrame;
+import javax.swing.JScrollPane;
+import javax.swing.JTextArea;
+
+/**
+ * This panel will be used to display all Vehicles in the VechicleDB
+ */
+public class ShowAllDialog extends JFrame implements ActionListener {
+
+ private static final long serialVersionUID = -8416144493079733535L;
+
+ /**
+ * Creates a new ShowAllDialog
+ */
+ public ShowAllDialog(String list){
+ super();
+ setTitle("Show All Accounts");
+
+ JButton ok = new JButton("Ok");
+ ok.addActionListener(this);
+
+
+ JScrollPane scrollPane = new JScrollPane();
+
+ JTextArea results = new JTextArea();
+ scrollPane.setViewportView(results);
+ results.setEditable(false);
+ results.setText(list);
+ this.getContentPane().add(scrollPane, BorderLayout.CENTER);
+ this.getContentPane().add(ok, BorderLayout.SOUTH);
+ pack();
+ setVisible(true);
+ }
+
+ @Override
+ public void actionPerformed(ActionEvent arg0) {
+ setVisible(false);
+ }
+}