Archives from S:\ Drive

Good to keep around methinks
This commit is contained in:
Amrit Panesar committed 2015-04-01 21:23:15 -07:00
1 parent eadaf70b9e
commit 6dd63cc439
606 files changed
+50212

No files matched your search

+74
View File
@@ -0,0 +1,74 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- You may freely edit this file. See commented blocks below for -->
<!-- some examples of how to customize the build. -->
<!-- (If you delete it and reopen the project it will be recreated.) -->
<!-- By default, only the Clean and Build commands use this build script. -->
<!-- Commands such as Run, Debug, and Test only use this build script if -->
<!-- the Compile on Save feature is turned off for the project. -->
<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
<!-- in the project's Project Properties dialog box.-->
<project name="Project3" default="default" basedir=".">
<description>Builds, tests, and runs the project Project3.</description>
<import file="nbproject/build-impl.xml"/>
<!--
There exist several targets which are by default empty and which can be
used for execution of your tasks. These targets are usually executed
before and after some main targets. They are:
-pre-init: called before initialization of project properties
-post-init: called after initialization of project properties
-pre-compile: called before javac compilation
-post-compile: called after javac compilation
-pre-compile-single: called before javac compilation of single file
-post-compile-single: called after javac compilation of single file
-pre-compile-test: called before javac compilation of JUnit tests
-post-compile-test: called after javac compilation of JUnit tests
-pre-compile-test-single: called before javac compilation of single JUnit test
-post-compile-test-single: called after javac compilation of single JUunit test
-pre-jar: called before JAR building
-post-jar: called after JAR building
-post-clean: called after cleaning build products
(Targets beginning with '-' are not intended to be called on their own.)
Example of inserting an obfuscator after compilation could look like this:
<target name="-post-compile">
<obfuscate>
<fileset dir="${build.classes.dir}"/>
</obfuscate>
</target>
For list of available properties check the imported
nbproject/build-impl.xml file.
Another way to customize the build is by overriding existing main targets.
The targets of interest are:
-init-macrodef-javac: defines macro for javac compilation
-init-macrodef-junit: defines macro for junit execution
-init-macrodef-debug: defines macro for class debugging
-init-macrodef-java: defines macro for class execution
-do-jar-with-manifest: JAR building (if you are using a manifest)
-do-jar-without-manifest: JAR building (if you are not using a manifest)
run: execution of project
-javadoc-build: Javadoc generation
test-report: JUnit report generation
An example of overriding the target for project execution could look like this:
<target name="run" depends="Project3-impl.jar">
<exec dir="bin" executable="launcher.exe">
<arg file="${dist.jar}"/>
</exec>
</target>
Notice that the overridden target depends on the jar target and not only on
the compile target as the regular run target does. Again, for a list of available
properties which you can use, check the target you are overriding in the
nbproject/build-impl.xml file.
-->
</project>
@@ -0,0 +1,3 @@
Manifest-Version: 1.0
X-COMMENT: Main-Class will be added automatically by build
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,8 @@
build.xml.data.CRC32=19528819
build.xml.script.CRC32=b133d664
build.xml.stylesheet.CRC32=28e38971@1.53.1.46
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
nbproject/build-impl.xml.data.CRC32=19528819
nbproject/build-impl.xml.script.CRC32=9c8db322
nbproject/build-impl.xml.stylesheet.CRC32=6ddba6b6@1.53.1.46
Whitespace-only changes.
@@ -0,0 +1,6 @@
compile.on.save=true
do.depend=false
do.jar=true
javac.debug=true
javadoc.preview=true
user.properties.file=C:\\Documents and Settings\\77260\\Application Data\\NetBeans\\7.2\\build.properties
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<project-private xmlns="http://www.netbeans.org/ns/project-private/1">
<editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="0"/>
</project-private>
@@ -0,0 +1,84 @@
annotation.processing.enabled=true
annotation.processing.enabled.in.editor=false
annotation.processing.processors.list=
annotation.processing.run.all.processors=true
annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output
application.title=Project3
application.vendor=77260
build.classes.dir=${build.dir}/classes
build.classes.excludes=**/*.java,**/*.form
# This directory is removed when the project is cleaned:
build.dir=build
build.generated.dir=${build.dir}/generated
build.generated.sources.dir=${build.dir}/generated-sources
# Only compile against the classpath explicitly listed here:
build.sysclasspath=ignore
build.test.classes.dir=${build.dir}/test/classes
build.test.results.dir=${build.dir}/test/results
# Uncomment to specify the preferred debugger connection transport:
#debug.transport=dt_socket
debug.classpath=\
${run.classpath}
debug.test.classpath=\
${run.test.classpath}
# This directory is removed when the project is cleaned:
dist.dir=dist
dist.jar=${dist.dir}/Project3.jar
dist.javadoc.dir=${dist.dir}/javadoc
endorsed.classpath=
excludes=
includes=**
jar.archive.disabled=${jnlp.enabled}
jar.compress=false
jar.index=${jnlp.enabled}
javac.classpath=
# Space-separated list of extra javac options
javac.compilerargs=
javac.deprecation=false
javac.processorpath=\
${javac.classpath}
javac.source=1.6
javac.target=1.6
javac.test.classpath=\
${javac.classpath}:\
${build.classes.dir}
javac.test.processorpath=\
${javac.test.classpath}
javadoc.additionalparam=
javadoc.author=false
javadoc.encoding=${source.encoding}
javadoc.noindex=false
javadoc.nonavbar=false
javadoc.notree=false
javadoc.private=false
javadoc.splitindex=true
javadoc.use=true
javadoc.version=false
javadoc.windowtitle=
jnlp.codebase.type=no.codebase
jnlp.descriptor=application
jnlp.enabled=false
jnlp.mixed.code=default
jnlp.offline-allowed=false
jnlp.signed=false
jnlp.signing=
jnlp.signing.alias=
jnlp.signing.keystore=
main.class=project3.gui
manifest.file=manifest.mf
meta.inf.dir=${src.dir}/META-INF
mkdist.disabled=false
platform.active=default_platform
run.classpath=\
${javac.classpath}:\
${build.classes.dir}
# Space-separated list of JVM arguments used when running the project.
# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value.
# To set system properties for unit tests define test-sys-prop.name=value:
run.jvmargs=
run.test.classpath=\
${javac.test.classpath}:\
${build.test.classes.dir}
source.encoding=UTF-8
src.dir=src
test.src.dir=test
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://www.netbeans.org/ns/project/1">
<type>org.netbeans.modules.java.j2seproject</type>
<configuration>
<data xmlns="http://www.netbeans.org/ns/j2se-project/3">
<name>Project3</name>
<explicit-platform explicit-source-supported="true"/>
<source-roots>
<root id="src.dir"/>
</source-roots>
<test-roots>
<root id="test.src.dir"/>
</test-roots>
</data>
</configuration>
</project>
@@ -0,0 +1,45 @@
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package project3;
/**
*
* @author 77260
*/
public class CashCustomer extends Customer {
/**
*Overrides Customer.java 's Discount percent.
*/
private double CustomerModifierPercent = 0.02;
private Customer customer;
public CashCustomer(Customer customer) {
this.customer = customer;
System.out.println("You are a cash customer, you get a 2% discount!");
}
public double getCustomerModifierPercent() {
return CustomerModifierPercent;
}
public void setCustomerModifierPercent(double CustomerModifierPercent) {
this.CustomerModifierPercent = CustomerModifierPercent;
}
public Customer getCustomer() {
return customer;
}
public void setCustomer(Customer customer) {
this.customer = customer;
}
@Override
public double doTotal(double dPrice)
{
return dPrice-(dPrice*(this.CustomerModifierPercent));
}
}
@@ -0,0 +1,45 @@
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package project3;
/**
*
* @author 77260
*/
public class CreditCustomer extends Customer{
private Customer customer;
/**
*Overrides Customer.java 's Discount percent.
*/
private double CustomerModifierPercent = +1.02;
public CreditCustomer(Customer customer) {
this.customer = customer;
System.out.println("You are a credit customer, you are subject to a 2% markup");
}
public Customer getCustomer() {
return customer;
}
public void setCustomer(Customer customer) {
this.customer = customer;
}
public double getCustomerModifierPercent() {
return CustomerModifierPercent;
}
public void setCustomerModifierPercent(double CustomerModifierPercent) {
this.CustomerModifierPercent = CustomerModifierPercent;
}
@Override
public double doTotal(double dPrice)
{
return dPrice*(this.CustomerModifierPercent);
}
}
@@ -0,0 +1,115 @@
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package project3;
/**
*
* @author 77260
*/
/**
*
* @author Amrit Panesar <apanesar@coleman.edu>
*/
public class Customer {
protected int CustomerID;
protected String CustomerName;
protected String CustomerAddress1;
protected String CustomerAddress2;
protected String CustomerCity;
protected String CustomerState;
protected String CustomerZip;
protected int CustomerPaymentType; // Customer.CASH, Customer.CREDIT
public static final int CASH = 0;
public static final int CREDIT = 1;
/**
* If extending this class, CustomerModifierPercent should be overridden.
*/
protected double CustomerModifierPercent = 0;
public Customer() {
}
public Customer(int CustomerID, String CustomerName, String CustomerAddress1, String CustomerAddress2, String CustomerCity, String CustomerState, String CustomerZip) {
this.CustomerID = CustomerID;
this.CustomerName = CustomerName;
this.CustomerAddress1 = CustomerAddress1;
this.CustomerAddress2 = CustomerAddress2;
this.CustomerCity = CustomerCity;
this.CustomerState = CustomerState;
this.CustomerZip = CustomerZip;
}
public int getCustomerID() {
return CustomerID;
}
public void setCustomerID(int CustomerID) {
this.CustomerID = CustomerID;
}
public String getCustomerName() {
return CustomerName;
}
public void setCustomerName(String CustomerName) {
this.CustomerName = CustomerName;
}
public String getCustomerAddress1() {
return CustomerAddress1;
}
public void setCustomerAddress1(String CustomerAddress1) {
this.CustomerAddress1 = CustomerAddress1;
}
public String getCustomerAddress2() {
return CustomerAddress2;
}
public void setCustomerAddress2(String CustomerAddress2) {
this.CustomerAddress2 = CustomerAddress2;
}
public String getCustomerCity() {
return CustomerCity;
}
public void setCustomerCity(String CustomerCity) {
this.CustomerCity = CustomerCity;
}
public String getCustomerState() {
return CustomerState;
}
public void setCustomerState(String CustomerState) {
this.CustomerState = CustomerState;
}
public String getCustomerZip() {
return CustomerZip;
}
public void setCustomerZip(String CustomerZip) {
this.CustomerZip = CustomerZip;
}
public int getCustomerPaymentType() {
return CustomerPaymentType;
}
public void setCustomerPaymentType(int CustomerPaymentType) {
this.CustomerPaymentType = CustomerPaymentType;
}
public double doTotal(double dPrice)
{
return -9.99;
}
}
@@ -0,0 +1,74 @@
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package project3;
/**
*
* @author 77260
*/
public class Inventory {
public int iItemID;
public String sItemName;
public int iInStore;
public double dManuPrice;
public double dSellPrice;
public Inventory() {
}
public Inventory(int iItemID, String sItemName, int iInStore, double dManuPrice, double dSellPrice) {
this.iItemID = iItemID;
this.sItemName = sItemName;
this.iInStore = iInStore;
this.dManuPrice = dManuPrice;
this.dSellPrice = dSellPrice;
}
public double getdManuPrice() {
return dManuPrice;
}
public void setdManuPrice(double dManuPrice) {
this.dManuPrice = dManuPrice;
}
public double getdSellPrice() {
return dSellPrice;
}
public void setdSellPrice(double dSellPrice) {
this.dSellPrice = dSellPrice;
}
public int getiInStore() {
return iInStore;
}
public void setiInStore(int iInStore) {
this.iInStore = iInStore;
}
public int getiItemID() {
return iItemID;
}
public void setiItemID(int iItemID) {
this.iItemID = iItemID;
}
public String getsItemName() {
return sItemName;
}
public void setsItemName(String sItemName) {
this.sItemName = sItemName;
}
@Override
public String toString()
{
return ""+this.getiInStore();
}
}
@@ -0,0 +1,76 @@
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package project3;
/**
*
* @author 77260
*/
public class Order {
private Customer customer;
private Inventory item;
private int quantity;
private double total;
public Order() {
}
public double getTotal() {
return total;
}
public void setTotal(double total) {
this.total = total;
}
public Order(Customer customer, Inventory item, int quantity, double total)
throws InsufcientQuantityException {
this.customer = customer;
this.item = item;
if (item.getiInStore() > quantity)
{
throw new InsufcientQuantityException();
}
else {
this.quantity = quantity;
}
this.total = total;
}
public Customer getCustomer() {
return customer;
}
public void setCustomer(Customer customer) {
this.customer = customer;
}
public Inventory getItem() {
return item;
}
public void setItem(Inventory item) {
this.item = item;
}
public int getQuantity() {
return quantity;
}
public void setQuantity(int quantity) {
this.quantity = quantity;
}
public double computePrice() {
return (this.quantity * this.item.getdManuPrice());
}
private static class InsufcientQuantityException extends Exception {
public InsufcientQuantityException() {
}
}
}
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,917 @@
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package project3;
/**
*
* @author 77260
*/
public class gui extends javax.swing.JFrame {
public static boolean jpanel2_set = false;
public static boolean jpanel3_set = false;
/**
* Creates new form gui
*/
public gui() {
initComponents();
}
/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
jTabbedPane1 = new javax.swing.JTabbedPane();
jPanel1 = new javax.swing.JPanel();
jPanel5 = new javax.swing.JPanel();
jLabel15 = new javax.swing.JLabel();
customer_stateL = new javax.swing.JLabel();
jLabel3 = new javax.swing.JLabel();
customer_address2L = new javax.swing.JLabel();
jLabel5 = new javax.swing.JLabel();
jLabel9 = new javax.swing.JLabel();
customer_zipL = new javax.swing.JLabel();
customer_idL = new javax.swing.JLabel();
jLabel13 = new javax.swing.JLabel();
customer_nameL = new javax.swing.JLabel();
jLabel11 = new javax.swing.JLabel();
jLabel7 = new javax.swing.JLabel();
customer_address1L = new javax.swing.JLabel();
customer_cityL = new javax.swing.JLabel();
jPanel8 = new javax.swing.JPanel();
jScrollPane3 = new javax.swing.JScrollPane();
customer_id_list = new javax.swing.JList();
jLabel1 = new javax.swing.JLabel();
jScrollPane4 = new javax.swing.JScrollPane();
customer_name_list = new javax.swing.JList();
jLabel2 = new javax.swing.JLabel();
jLabel10 = new javax.swing.JLabel();
jPanel2 = new javax.swing.JPanel();
jPanel4 = new javax.swing.JPanel();
lblItemID = new javax.swing.JLabel();
lblItemPriceD = new javax.swing.JLabel();
lblItemNameD = new javax.swing.JLabel();
lblItemStock = new javax.swing.JLabel();
lblItemIDD = new javax.swing.JLabel();
lblItemStockD = new javax.swing.JLabel();
lblItemPrice = new javax.swing.JLabel();
lblItemName = new javax.swing.JLabel();
jPanel6 = new javax.swing.JPanel();
lblInventoryItems = new javax.swing.JLabel();
lblByID = new javax.swing.JLabel();
jScrollPane2 = new javax.swing.JScrollPane();
item_by_name = new javax.swing.JList();
jScrollPane1 = new javax.swing.JScrollPane();
item_by_id = new javax.swing.JList();
lblByName = new javax.swing.JLabel();
jLabel18 = new javax.swing.JLabel();
jPanel3 = new javax.swing.JPanel();
jPanel7 = new javax.swing.JPanel();
jLabel12 = new javax.swing.JLabel();
jLabel17 = new javax.swing.JLabel();
order_customerID = new javax.swing.JLabel();
jLabel4 = new javax.swing.JLabel();
jLabel8 = new javax.swing.JLabel();
order_customerName = new javax.swing.JLabel();
order_itemID = new javax.swing.JLabel();
jLabel19 = new javax.swing.JLabel();
order_itemName = new javax.swing.JLabel();
jLabel6 = new javax.swing.JLabel();
order_itemStock = new javax.swing.JLabel();
order_itemQty = new javax.swing.JTextField();
jButton1 = new javax.swing.JButton();
jLabel14 = new javax.swing.JLabel();
jPanel9 = new javax.swing.JPanel();
jLabel22 = new javax.swing.JLabel();
order_city = new javax.swing.JLabel();
jLabel21 = new javax.swing.JLabel();
jLabel29 = new javax.swing.JLabel();
order_zip = new javax.swing.JLabel();
order_state = new javax.swing.JLabel();
order_address1 = new javax.swing.JLabel();
jLabel16 = new javax.swing.JLabel();
order_address2 = new javax.swing.JLabel();
jLabel23 = new javax.swing.JLabel();
jLabel20 = new javax.swing.JLabel();
jComboBox1 = new javax.swing.JComboBox();
jButton2 = new javax.swing.JButton();
jMenuBar1 = new javax.swing.JMenuBar();
jMenu1 = new javax.swing.JMenu();
jMenuItem1 = new javax.swing.JMenuItem();
jMenu2 = new javax.swing.JMenu();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setTitle("Customer Information Control System");
jTabbedPane1.setTabLayoutPolicy(javax.swing.JTabbedPane.SCROLL_TAB_LAYOUT);
jPanel5.setBorder(javax.swing.BorderFactory.createEtchedBorder());
jLabel15.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
jLabel15.setText("Zip:");
jLabel3.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
jLabel3.setText("Name:");
jLabel5.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
jLabel5.setText("Customer ID:");
jLabel9.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
jLabel9.setText("Address 2:");
jLabel13.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
jLabel13.setText("State:");
jLabel11.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
jLabel11.setText("City:");
jLabel7.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
jLabel7.setText("Address 1:");
javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
jPanel5.setLayout(jPanel5Layout);
jPanel5Layout.setHorizontalGroup(
jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel5Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel5Layout.createSequentialGroup()
.addGap(25, 25, 25)
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(jLabel13)
.addComponent(jLabel11)
.addComponent(jLabel15))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(customer_cityL, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(customer_stateL, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(customer_zipL, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
.addGroup(jPanel5Layout.createSequentialGroup()
.addGap(12, 12, 12)
.addComponent(jLabel5)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(customer_idL, javax.swing.GroupLayout.DEFAULT_SIZE, 147, Short.MAX_VALUE))
.addGroup(jPanel5Layout.createSequentialGroup()
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel9)
.addComponent(jLabel3, javax.swing.GroupLayout.Alignment.TRAILING))
.addComponent(jLabel7))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(customer_nameL, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(customer_address1L, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(customer_address2L, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))
.addContainerGap())
);
jPanel5Layout.setVerticalGroup(
jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel5Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(customer_idL, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jLabel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addGap(11, 11, 11)
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel3)
.addComponent(customer_nameL, javax.swing.GroupLayout.PREFERRED_SIZE, 17, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(jLabel7, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(customer_address1L, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addGap(11, 11, 11)
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(jLabel9, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(customer_address2L, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(jLabel11, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(customer_cityL, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel13)
.addComponent(customer_stateL, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel5Layout.createSequentialGroup()
.addComponent(jLabel15)
.addGap(0, 0, Short.MAX_VALUE))
.addComponent(customer_zipL, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addContainerGap())
);
jPanel8.setBorder(javax.swing.BorderFactory.createEtchedBorder());
customer_id_list.setModel(new javax.swing.AbstractListModel() {
String[] strings = main.customer_get('a');
public int getSize() { return strings.length; }
public Object getElementAt(int i) { return strings[i]; }
});
customer_id_list.addListSelectionListener(new javax.swing.event.ListSelectionListener() {
public void valueChanged(javax.swing.event.ListSelectionEvent evt) {
customer_id_listValueChanged(evt);
}
});
jScrollPane3.setViewportView(customer_id_list);
jLabel1.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
jLabel1.setText("Customer Name:");
customer_name_list.setModel(new javax.swing.AbstractListModel() {
String[] strings = main.customer_get('b');
public int getSize() { return strings.length; }
public Object getElementAt(int i) { return strings[i]; }
});
customer_name_list.addListSelectionListener(new javax.swing.event.ListSelectionListener() {
public void valueChanged(javax.swing.event.ListSelectionEvent evt) {
customer_name_listValueChanged(evt);
}
});
jScrollPane4.setViewportView(customer_name_list);
jLabel2.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
jLabel2.setText("Customer ID:");
javax.swing.GroupLayout jPanel8Layout = new javax.swing.GroupLayout(jPanel8);
jPanel8.setLayout(jPanel8Layout);
jPanel8Layout.setHorizontalGroup(
jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel8Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE))
.addGap(18, 18, 18)
.addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel1)
.addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 81, javax.swing.GroupLayout.PREFERRED_SIZE))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
jPanel8Layout.setVerticalGroup(
jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel8Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel1)
.addComponent(jLabel2))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addContainerGap())
);
jLabel10.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
jLabel10.setText("Customer Information:");
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
jPanel1.setLayout(jPanel1Layout);
jPanel1Layout.setHorizontalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(jPanel8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addComponent(jPanel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(jLabel10)
.addGap(0, 0, Short.MAX_VALUE)))
.addContainerGap())
);
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(6, 6, 6)
.addComponent(jLabel10)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(jPanel8, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jPanel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addContainerGap(21, Short.MAX_VALUE))
);
jTabbedPane1.addTab("Customers", jPanel1);
jPanel4.setBorder(javax.swing.BorderFactory.createEtchedBorder());
lblItemID.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
lblItemID.setText("Item ID:");
lblItemStock.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
lblItemStock.setText("Item Stock:");
lblItemPrice.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
lblItemPrice.setText("Item Price:");
lblItemName.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
lblItemName.setText("Item Name:");
javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
jPanel4.setLayout(jPanel4Layout);
jPanel4Layout.setHorizontalGroup(
jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel4Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(lblItemPrice, javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(lblItemStock, javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(lblItemID, javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(lblItemName, javax.swing.GroupLayout.Alignment.TRAILING))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel4Layout.createSequentialGroup()
.addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(lblItemStockD, javax.swing.GroupLayout.PREFERRED_SIZE, 156, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(lblItemIDD, javax.swing.GroupLayout.DEFAULT_SIZE, 156, Short.MAX_VALUE)
.addComponent(lblItemPriceD, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
.addGap(0, 62, Short.MAX_VALUE))
.addComponent(lblItemNameD, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addContainerGap())
);
jPanel4Layout.setVerticalGroup(
jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel4Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(lblItemName, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(lblItemNameD, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addGap(11, 11, 11)
.addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(lblItemIDD, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(lblItemID, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(lblItemPrice)
.addComponent(lblItemPriceD, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel4Layout.createSequentialGroup()
.addComponent(lblItemStock)
.addGap(0, 0, Short.MAX_VALUE))
.addComponent(lblItemStockD, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addContainerGap())
);
jPanel6.setBorder(javax.swing.BorderFactory.createEtchedBorder());
lblInventoryItems.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
lblInventoryItems.setText("Inventory Items:");
lblByID.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
lblByID.setText("By ID");
item_by_name.setModel(new javax.swing.AbstractListModel() {
String[] strings = main.item_get('b');
public int getSize() { return strings.length; }
public Object getElementAt(int i) { return strings[i]; }
});
item_by_name.addListSelectionListener(new javax.swing.event.ListSelectionListener() {
public void valueChanged(javax.swing.event.ListSelectionEvent evt) {
item_by_nameValueChanged(evt);
}
});
jScrollPane2.setViewportView(item_by_name);
item_by_id.setModel(new javax.swing.AbstractListModel() {
String[] strings = main.item_get('a');
public int getSize() { return strings.length; }
public Object getElementAt(int i) { return strings[i]; }
});
item_by_id.addListSelectionListener(new javax.swing.event.ListSelectionListener() {
public void valueChanged(javax.swing.event.ListSelectionEvent evt) {
item_by_idValueChanged(evt);
}
});
jScrollPane1.setViewportView(item_by_id);
lblByName.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
lblByName.setText("By Name");
javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);
jPanel6.setLayout(jPanel6Layout);
jPanel6Layout.setHorizontalGroup(
jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel6Layout.createSequentialGroup()
.addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel6Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(lblByID, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE))
.addGap(18, 18, 18)
.addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(lblByName)
.addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 71, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addGroup(jPanel6Layout.createSequentialGroup()
.addGap(19, 19, 19)
.addComponent(lblInventoryItems)))
.addContainerGap())
);
jPanel6Layout.setVerticalGroup(
jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel6Layout.createSequentialGroup()
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(lblInventoryItems)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(lblByName)
.addComponent(lblByID, javax.swing.GroupLayout.Alignment.TRAILING))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 119, Short.MAX_VALUE)
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE))
.addContainerGap())
);
jLabel18.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
jLabel18.setText("Inventory Information:");
javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
jPanel2.setLayout(jPanel2Layout);
jPanel2Layout.setHorizontalGroup(
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel2Layout.createSequentialGroup()
.addGap(25, 25, 25)
.addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addContainerGap())
.addGroup(jPanel2Layout.createSequentialGroup()
.addContainerGap()
.addComponent(jLabel18)
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
jPanel2Layout.setVerticalGroup(
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(53, 53, 53))
.addGroup(jPanel2Layout.createSequentialGroup()
.addContainerGap()
.addComponent(jLabel18)
.addGap(12, 12, 12)
.addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
/*
jTabbedPane1.addTab("Inventory", jPanel2);
*/
jPanel7.setBorder(javax.swing.BorderFactory.createEtchedBorder());
jLabel12.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
jLabel12.setText("Item Quantity:");
jLabel17.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
jLabel17.setText("Customer Name:");
jLabel4.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
jLabel4.setText("Item Name:");
jLabel8.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
jLabel8.setText("Item ID:");
jLabel19.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
jLabel19.setText("Customer ID:");
jLabel6.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
jLabel6.setText("Item Stock:");
order_itemQty.setText("0");
order_itemQty.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
order_itemQtyActionPerformed(evt);
}
});
javax.swing.GroupLayout jPanel7Layout = new javax.swing.GroupLayout(jPanel7);
jPanel7.setLayout(jPanel7Layout);
jPanel7Layout.setHorizontalGroup(
jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel7Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(jLabel12)
.addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(jLabel17)
.addGroup(jPanel7Layout.createSequentialGroup()
.addComponent(jLabel19)
.addGap(2, 2, 2))
.addComponent(jLabel8))
.addComponent(jLabel4, javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(jLabel6, javax.swing.GroupLayout.Alignment.TRAILING)))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(order_itemName, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(order_customerID, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(order_itemID, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(order_itemStock, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(order_customerName, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(order_itemQty, javax.swing.GroupLayout.DEFAULT_SIZE, 139, Short.MAX_VALUE))
.addContainerGap())
);
jPanel7Layout.setVerticalGroup(
jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel7Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(jLabel17, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(order_customerName, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel19)
.addComponent(order_customerID, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(jLabel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(order_itemName, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel8)
.addComponent(order_itemID, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(jLabel6, javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(order_itemStock, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel12)
.addComponent(order_itemQty, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(14, 14, 14))
);
jButton1.setText("Submit");
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});
jLabel14.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
jLabel14.setText("Order Summery:");
jPanel9.setBorder(javax.swing.BorderFactory.createEtchedBorder());
jLabel22.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
jLabel22.setText("City:");
jLabel21.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
jLabel21.setText("Address 2:");
jLabel29.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
jLabel29.setText("Zip Code:");
jLabel16.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
jLabel16.setText("Address 1:");
jLabel23.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
jLabel23.setText("State:");
jLabel20.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
jLabel20.setText("Payment Type:");
jComboBox1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Cash", "Credit" }));
jComboBox1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jComboBox1ActionPerformed(evt);
}
});
javax.swing.GroupLayout jPanel9Layout = new javax.swing.GroupLayout(jPanel9);
jPanel9.setLayout(jPanel9Layout);
jPanel9Layout.setHorizontalGroup(
jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel9Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel9Layout.createSequentialGroup()
.addComponent(jLabel20)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jComboBox1, 0, 97, Short.MAX_VALUE))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel9Layout.createSequentialGroup()
.addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel9Layout.createSequentialGroup()
.addGap(13, 13, 13)
.addComponent(jLabel29)
.addGap(0, 0, Short.MAX_VALUE))
.addGroup(jPanel9Layout.createSequentialGroup()
.addGap(0, 0, Short.MAX_VALUE)
.addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(jLabel21)
.addComponent(jLabel22)
.addComponent(jLabel16)
.addComponent(jLabel23))))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(order_address2, javax.swing.GroupLayout.DEFAULT_SIZE, 112, Short.MAX_VALUE)
.addComponent(order_state, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(order_city, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(order_address1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(order_zip, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))
.addContainerGap())
);
jPanel9Layout.setVerticalGroup(
jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel9Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(jLabel16, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(order_address1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(jLabel21, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(order_address2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(jLabel22, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(order_city, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addGap(11, 11, 11)
.addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(jLabel23, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(order_state, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel29)
.addComponent(order_zip, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel20)
.addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
jButton2.setText("Reset");
javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
jPanel3.setLayout(jPanel3Layout);
jPanel3Layout.setHorizontalGroup(
jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel3Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()
.addComponent(jPanel7, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGap(18, 18, 18)
.addComponent(jPanel9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()
.addGap(0, 0, Short.MAX_VALUE)
.addComponent(jButton2)
.addGap(18, 18, 18)
.addComponent(jButton1))
.addGroup(jPanel3Layout.createSequentialGroup()
.addComponent(jLabel14)
.addGap(0, 0, Short.MAX_VALUE)))
.addContainerGap())
);
jPanel3Layout.setVerticalGroup(
jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel3Layout.createSequentialGroup()
.addGap(7, 7, 7)
.addComponent(jLabel14)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(jPanel9, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jPanel7, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addContainerGap(35, Short.MAX_VALUE))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jButton2)
.addComponent(jButton1))
.addContainerGap())
);
/*
jTabbedPane1.addTab("Order", jPanel3);
*/
jMenu1.setText("File");
jMenuItem1.setText("Close");
jMenuItem1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jMenuItem1ActionPerformed(evt);
}
});
jMenu1.add(jMenuItem1);
jMenuBar1.add(jMenu1);
jMenu2.setText("Edit");
jMenuBar1.add(jMenu2);
setJMenuBar(jMenuBar1);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addComponent(jTabbedPane1))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jTabbedPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
);
pack();
}// </editor-fold>//GEN-END:initComponents
private void jMenuItem1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem1ActionPerformed
// TODO add your handling code here:
System.exit(0);
}//GEN-LAST:event_jMenuItem1ActionPerformed
private void customer_name_listValueChanged(javax.swing.event.ListSelectionEvent evt) {//GEN-FIRST:event_customer_name_listValueChanged
// TODO add your handling code here:
customer_id_list.setSelectedIndex(customer_name_list.getSelectedIndex());
customer_idL.setText(""+main.cu.get(customer_name_list.getSelectedIndex()).getCustomerID());
customer_nameL.setText(""+main.cu.get(customer_name_list.getSelectedIndex()).getCustomerName());
customer_address1L.setText(""+main.cu.get(customer_name_list.getSelectedIndex()).getCustomerAddress1());
customer_address2L.setText(""+main.cu.get(customer_name_list.getSelectedIndex()).getCustomerAddress2());
customer_cityL.setText(""+main.cu.get(customer_name_list.getSelectedIndex()).getCustomerCity());
customer_stateL.setText(""+main.cu.get(customer_name_list.getSelectedIndex()).getCustomerState());
customer_zipL.setText(""+main.cu.get(customer_name_list.getSelectedIndex()).getCustomerZip());
order_customerID.setText(""+main.cu.get(customer_name_list.getSelectedIndex()).getCustomerID());
order_customerName.setText(""+main.cu.get(customer_name_list.getSelectedIndex()).getCustomerName());
order_address1.setText(""+main.cu.get(customer_name_list.getSelectedIndex()).getCustomerAddress1());
order_address2.setText(""+main.cu.get(customer_name_list.getSelectedIndex()).getCustomerAddress2());
order_city.setText(""+main.cu.get(customer_name_list.getSelectedIndex()).getCustomerCity());
order_state.setText(""+main.cu.get(customer_name_list.getSelectedIndex()).getCustomerState());
order_zip.setText(""+main.cu.get(customer_name_list.getSelectedIndex()).getCustomerZip());
if (!jpanel2_set) {
jTabbedPane1.addTab("Inventory", jPanel2);
jpanel2_set = true;
}
jTabbedPane1.setSelectedComponent(jPanel2);
}//GEN-LAST:event_customer_name_listValueChanged
private void customer_id_listValueChanged(javax.swing.event.ListSelectionEvent evt) {//GEN-FIRST:event_customer_id_listValueChanged
// TODO add your handling code here:
customer_name_list.setSelectedIndex(customer_id_list.getSelectedIndex());
}//GEN-LAST:event_customer_id_listValueChanged
private void order_itemQtyActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_order_itemQtyActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_order_itemQtyActionPerformed
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_jButton1ActionPerformed
private void item_by_idValueChanged(javax.swing.event.ListSelectionEvent evt) {//GEN-FIRST:event_item_by_idValueChanged
// TODO add your handling code here:
item_by_name.setSelectedIndex(item_by_id.getSelectedIndex());
lblItemNameD.setText(""+main.al.get(item_by_id.getSelectedIndex()).getsItemName());
lblItemIDD.setText(""+main.al.get(item_by_id.getSelectedIndex()).getiItemID());
lblItemPriceD.setText(""+main.al.get(item_by_id.getSelectedIndex()).getdSellPrice());
lblItemStockD.setText(""+main.al.get(item_by_id.getSelectedIndex()).getiInStore());
order_itemID.setText(""+main.al.get(item_by_id.getSelectedIndex()).getiItemID());
order_itemName.setText(""+main.al.get(item_by_id.getSelectedIndex()).getsItemName());
order_itemStock.setText(""+main.al.get(item_by_id.getSelectedIndex()).getiInStore());
if (!jpanel3_set) {
jTabbedPane1.addTab("Order", jPanel3);
jpanel2_set = true;
}
jTabbedPane1.setSelectedComponent(jPanel3);
}//GEN-LAST:event_item_by_idValueChanged
private void item_by_nameValueChanged(javax.swing.event.ListSelectionEvent evt) {//GEN-FIRST:event_item_by_nameValueChanged
// TODO add your handling code here:
item_by_id.setSelectedIndex(item_by_name.getSelectedIndex());
}//GEN-LAST:event_item_by_nameValueChanged
private void jComboBox1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jComboBox1ActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_jComboBox1ActionPerformed
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
/* Set the Nimbus look and feel */
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
* For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
*/
try {
/*
for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
} */
javax.swing.UIManager.setLookAndFeel(javax.swing.UIManager.getSystemLookAndFeelClassName());
} catch (ClassNotFoundException ex) {
java.util.logging.Logger.getLogger(gui.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(gui.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(gui.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(gui.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
}
//</editor-fold>
/* Create and display the form */
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new gui().setVisible(true);
}
});
//customer_id_list.setListData(new String[]{"omg", "lol", "wut"});
}
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JLabel customer_address1L;
private javax.swing.JLabel customer_address2L;
private javax.swing.JLabel customer_cityL;
private javax.swing.JLabel customer_idL;
private static javax.swing.JList customer_id_list;
private javax.swing.JLabel customer_nameL;
private static javax.swing.JList customer_name_list;
private javax.swing.JLabel customer_stateL;
private javax.swing.JLabel customer_zipL;
private javax.swing.JList item_by_id;
private javax.swing.JList item_by_name;
private javax.swing.JButton jButton1;
private javax.swing.JButton jButton2;
private javax.swing.JComboBox jComboBox1;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel10;
private javax.swing.JLabel jLabel11;
private javax.swing.JLabel jLabel12;
private javax.swing.JLabel jLabel13;
private javax.swing.JLabel jLabel14;
private javax.swing.JLabel jLabel15;
private javax.swing.JLabel jLabel16;
private javax.swing.JLabel jLabel17;
private javax.swing.JLabel jLabel18;
private javax.swing.JLabel jLabel19;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel20;
private javax.swing.JLabel jLabel21;
private javax.swing.JLabel jLabel22;
private javax.swing.JLabel jLabel23;
private javax.swing.JLabel jLabel29;
private javax.swing.JLabel jLabel3;
private javax.swing.JLabel jLabel4;
private javax.swing.JLabel jLabel5;
private javax.swing.JLabel jLabel6;
private javax.swing.JLabel jLabel7;
private javax.swing.JLabel jLabel8;
private javax.swing.JLabel jLabel9;
private javax.swing.JMenu jMenu1;
private javax.swing.JMenu jMenu2;
private javax.swing.JMenuBar jMenuBar1;
private javax.swing.JMenuItem jMenuItem1;
private javax.swing.JPanel jPanel1;
private javax.swing.JPanel jPanel2;
private javax.swing.JPanel jPanel3;
private javax.swing.JPanel jPanel4;
private javax.swing.JPanel jPanel5;
private javax.swing.JPanel jPanel6;
private javax.swing.JPanel jPanel7;
private javax.swing.JPanel jPanel8;
private javax.swing.JPanel jPanel9;
private javax.swing.JScrollPane jScrollPane1;
private javax.swing.JScrollPane jScrollPane2;
private javax.swing.JScrollPane jScrollPane3;
private javax.swing.JScrollPane jScrollPane4;
private javax.swing.JTabbedPane jTabbedPane1;
private javax.swing.JLabel lblByID;
private javax.swing.JLabel lblByName;
private javax.swing.JLabel lblInventoryItems;
private javax.swing.JLabel lblItemID;
private javax.swing.JLabel lblItemIDD;
private javax.swing.JLabel lblItemName;
private javax.swing.JLabel lblItemNameD;
private javax.swing.JLabel lblItemPrice;
private javax.swing.JLabel lblItemPriceD;
private javax.swing.JLabel lblItemStock;
private javax.swing.JLabel lblItemStockD;
private javax.swing.JLabel order_address1;
private javax.swing.JLabel order_address2;
private javax.swing.JLabel order_city;
private javax.swing.JLabel order_customerID;
private javax.swing.JLabel order_customerName;
private javax.swing.JLabel order_itemID;
private javax.swing.JLabel order_itemName;
private javax.swing.JTextField order_itemQty;
private javax.swing.JLabel order_itemStock;
private javax.swing.JLabel order_state;
private javax.swing.JLabel order_zip;
// End of variables declaration//GEN-END:variables
}
@@ -0,0 +1,81 @@
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package project3;
import java.util.ArrayList;
/**
*
* @author 77260
*/
public class main {
protected static ArrayList<Inventory> al = inventory_init();
protected static ArrayList<Customer> cu = customer_init();
protected static ArrayList<Order> or = order_init();
protected static ArrayList<Inventory> inventory_init()
{
ArrayList<Inventory> al = new ArrayList<Inventory>(5);
al.add(0, new Inventory(12,"Circular saw", 150, 45.00, 125.00));
al.add(1, new Inventory(235,"Cooking range", 50, 450.00, 850.00));
al.add(2, new Inventory(301,"Table saw", 100, 125.00, 300.00));
al.add(3, new Inventory(302,"Stapler\t", 300, 18.00, 49.00));
al.add(4, new Inventory(303,"Lawn tractor", 5, 300.00, 650.00));
return al;
}
protected static ArrayList<Customer> customer_init() {
ArrayList<Customer> cu = new ArrayList<Customer>(5);
cu.add(0,new Customer(0, "Kermit Thefrog", "8888 Balboa Avenue", "", "San Diego", "CA", "92123"));
return cu;
}
protected static String[] customer_get(char type) {
String[] ret = new String[cu.size()];
int count = 0;
switch(type) {
case 'a':
for(Customer x:cu) {
ret[count] = ""+x.CustomerID;
count++;
}
break;
case 'b':
for(Customer x:cu){
ret[count] = ""+x.getCustomerName();
count++;
}
break;
}
return ret;
}
protected static String[] item_get(char type) {
String[] ret = new String[al.size()];
int count = 0;
switch(type) {
case 'a':
for(Inventory x:al) {
ret[count] = ""+x.getiItemID();
count++;
}
break;
case 'b':
for(Inventory x:al){
ret[count] = ""+x.getsItemName();
count++;
}
break;
}
return ret;
}
protected static ArrayList<Order> order_init() {
ArrayList<Order> or = new ArrayList<Order>(5);
return or;
}
}