亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? inventorygui.java

?? it is an inventory system which is used to maintain all the accounts of stores
?? JAVA
?? 第 1 頁 / 共 4 頁
字號:
// Code Written By Kevin Dela Rosa			June 14, 2004// Created using JCreator and NetBeans IDE/***********************************************************************************//**                                                                               **//**                      Inventory Deluxe v 1.03                                  **/ /**                      InventoryGui Class                                       **/ /**                                                                               **//***********************************************************************************/import  java.io.*;import  java.util.*;import  java.text.*;import  java.awt.*;import  java.awt.event.*;import  javax.swing.*;import  javax.swing.filechooser.*; public class InventoryGui extends  JFrame implements ActionListener{    private Company companyObject;		// Company Object    private String  toolTips[][];	    // Matrix that contains the tool tips for the Inventory Table    private boolean boolSortName;       // Determines if the Inventory Table should be sorted by name or by item number        public InventoryGui() throws IOException    // Default Constructor that initializes the components        {        initComponents();    }        public void refreshFinancialInformation()    // Refreshes the data that is displayed in financial information    {    	DecimalFormat dollar = new DecimalFormat("$0.00");    	String funds = dollar.format(companyObject.getFunds());    	jLabelFinancialStatement.setText("The company currently holds " + funds + " in cash.");    }        public void refreshTable()    // Refreshes the Data that is displayed in the inventory Table    {    	DecimalFormat dollar = new DecimalFormat("$0.00");    	if(boolSortName)    		companyObject.sortByName();    	else    		companyObject.sortById();    	ArrayList temp = companyObject.getItems();    	int numRows = temp.size();    	int newWidth = 650;    	int newHeight = 0;    	    	    	String[] columnNames = new String [] {"Name", "Item Number", "Quantity", "Sales Price",                                 "Order Price", "Descrpition"};    	    	Object[][] tableData = new Object[numRows][columnNames.length];    	    	toolTips = new String[numRows][columnNames.length];    	for(int x = 0; x < numRows; x++)    	{    		Item i = (Item) temp.get(x);    		    		String salesPrice = dollar.format(i.getSalesPrice());    		String orderPrice = dollar.format(i.getOrderPrice());    		    		tableData[x][0] = i.getName();    		tableData[x][1] = i.getId();    		tableData[x][2] = new Integer(i.getAmount());    		tableData[x][3] = salesPrice;    		tableData[x][4] = orderPrice;    		tableData[x][5] = i.getDescription();    		    		toolTips[x][0] = i.getName();    		toolTips[x][1] = i.getId();    		toolTips[x][2] = Integer.toString(i.getAmount());    		toolTips[x][3] = salesPrice;    		toolTips[x][4] = orderPrice;    		toolTips[x][5] = i.getDescription();    		    	}    	 	        jTableInventory.setModel(new  javax.swing.table.DefaultTableModel(tableData,columnNames)         {            Class[] types = new Class [] {            	java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class            };            boolean[] canEdit = new boolean [] {                false, false, false, false, false, false            };                public Class getColumnClass(int columnIndex) {                return types [columnIndex];            }            public boolean isCellEditable(int rowIndex, int columnIndex) {                return canEdit [columnIndex];            }        });            	    	newHeight = numRows * 16;    	if(newHeight < 350)    		newHeight = 350;    		    		    	jTableInventory.setPreferredSize(new  Dimension(newWidth, newHeight));    	refreshFinancialInformation();    } 	public void actionPerformed(ActionEvent evt)	// Handles the action events from the menus and buttons found on the graphical user interface	{			String cmd = evt.getActionCommand();				if(cmd.equals("Sales"))		{			String itemNumber = jTextFieldSalesItemNumber.getText();						try			{				jTextFieldSalesItemNumber.setText(null);								int quantity = Integer.parseInt(jTextFieldSalesQuantity.getText());								if(quantity <= 0)				{					JOptionPane.showMessageDialog(this, "Please only enter positive numbers.", "Input Error", JOptionPane.ERROR_MESSAGE);										}				else if(!companyObject.newSales(itemNumber, quantity))				{					JOptionPane.showMessageDialog(this, "Please enter a valid Item Number, or\nEnter a valid value for the quantity of items sold.","Input Error", JOptionPane.ERROR_MESSAGE);				}				else				{					JOptionPane.showMessageDialog(this, "Sale Complete!", "Sales", JOptionPane.INFORMATION_MESSAGE);				}			}			catch(Exception E)			{				JOptionPane.showMessageDialog(this, "Please enter valid values.", "Input Error",JOptionPane.ERROR_MESSAGE);							} 			jTextFieldSalesQuantity.setText(null);			refreshTable();					}					if(cmd.equals("Order"))		{						String itemNumber = jTextFieldOrderItemNumber.getText();			jTextFieldOrderItemNumber.setText(null);						try			{				int quantity = Integer.parseInt(jTextFieldOrderQuantity.getText());								if(quantity <= 0)				{					JOptionPane.showMessageDialog(this, "Please only enter positive numbers.", "Input Error", JOptionPane.ERROR_MESSAGE);				}				else if(!companyObject.newOrders(itemNumber, quantity))				{					JOptionPane.showMessageDialog(this, "Please enter a valid Item Number, or\nEnter a valid value for the quantity of items ordered.", "Input Error", JOptionPane.ERROR_MESSAGE);				}				else				{					JOptionPane.showMessageDialog(this, "Order Complete!", "Orders", JOptionPane.INFORMATION_MESSAGE);				}			}			catch(Exception E)			{				JOptionPane.showMessageDialog(this, "Please enter valid values.", "Input Error", JOptionPane.ERROR_MESSAGE);					} 				jTextFieldOrderQuantity.setText(null);			refreshTable();				}					if(cmd.equals("Liquidate"))		{			String itemNumber = jTextFieldlLiquidateItemNumber.getText();			jTextFieldlLiquidateItemNumber.setText(null);							if(!companyObject.liquidateItem(itemNumber))			{								JOptionPane.showMessageDialog(this, "Please enter a valid Item Number", "Input Error", JOptionPane.ERROR_MESSAGE);			}			else			{				JOptionPane.showMessageDialog(this, "Item Liquidated!", "Liquidation", JOptionPane.INFORMATION_MESSAGE);			}			refreshTable();		}							if(cmd.equals("New"))		{			String itemNumber = jTextFieldNewItemNumber.getText();			jTextFieldNewItemNumber.setText(null);						String name = jTextFieldNewItemName.getText();			jTextFieldNewItemName.setText(null);						String description = jTextFieldNewItemDescrpition.getText();			jTextFieldNewItemDescrpition.setText(null);							try			{				int itemNumbertest = Integer.parseInt(itemNumber);				double salesPrice = Double.parseDouble(jTextFieldNewItemSalesPrice.getText());				double orderPrice = Double.parseDouble(jTextFieldNewItemOrderPrice.getText());				int initialAmount = Integer.parseInt(jTextFieldNewItemInitialAmount.getText());								if(salesPrice <= 0.0 || orderPrice <= 0.0 || initialAmount <= 0 || itemNumbertest <= 0)				{					JOptionPane.showMessageDialog(this, "Please only enter positive numbers.", "Input Error", JOptionPane.ERROR_MESSAGE);				}				else if(!companyObject.makeItem(name, description, itemNumber, salesPrice, orderPrice, initialAmount))				{					JOptionPane.showMessageDialog(this, ("Item number \"" + itemNumber + "\" already exists.\n or \n Order less of item."), "Input Error",JOptionPane.ERROR_MESSAGE);				}				else				{					JOptionPane.showMessageDialog(this, "New Item Created!", "New Item", JOptionPane.INFORMATION_MESSAGE);				}			}			catch(Exception e)			{				JOptionPane.showMessageDialog(this, "Please enter valid types.", "Input Error", JOptionPane.ERROR_MESSAGE);			}			jTextFieldNewItemSalesPrice.setText(null);			jTextFieldNewItemOrderPrice.setText(null);			jTextFieldNewItemInitialAmount.setText(null);			refreshTable();		}					if(cmd.equals("Update"))		{						String itemNumber = jTextFieldUpdateItemNumber.getText();			jTextFieldUpdateItemNumber.setText(null);						boolean orderPriceUpdate = false;			boolean salesPriceUpdate = false;						if(jTextFieldUpdateOrderPrice.getText() != null )			{				try				{					double orderPrice = Double.parseDouble(jTextFieldUpdateOrderPrice.getText());						if(orderPrice < 0.0)					{						JOptionPane.showMessageDialog(this, "Please enter a positive numbers for Order Price", "Input Error", JOptionPane.ERROR_MESSAGE);					}					else if(companyObject.changeOrderPrice(itemNumber, orderPrice))					{						orderPriceUpdate = true;					}					else					{						JOptionPane.showMessageDialog(this, "Please enter a valid Item Number", "Input Error", JOptionPane.ERROR_MESSAGE);					}										}				catch(Exception e)				{				}			}						jTextFieldUpdateOrderPrice.setText(null);						if(jTextFieldUpdateSalesPrice.getText() != null)			{				try				{									double salesPrice = Double.parseDouble(jTextFieldUpdateSalesPrice.getText());												if(salesPrice < 0.0)					{						JOptionPane.showMessageDialog(this, "Please enter a positive number for Sales Price.", "Input Error", JOptionPane.ERROR_MESSAGE);					}					else if(companyObject.changeSalesPrice(itemNumber, salesPrice))					{						salesPriceUpdate = true;					}					else					{						if(jTextFieldUpdateOrderPrice.getText() == null )						{							JOptionPane.showMessageDialog(this, "Please enter a valid Item Number", "Input Error",JOptionPane.ERROR_MESSAGE);						}					}				}				catch(Exception e)				{				}			}							jTextFieldUpdateSalesPrice.setText(null);							if(orderPriceUpdate)			{				if(salesPriceUpdate)				{					JOptionPane.showMessageDialog(this, "Both Order Price and Sales Price will be updated!", "Update", JOptionPane.INFORMATION_MESSAGE);				}				else				{					JOptionPane.showMessageDialog(this, "Only Order Price will be updated!", "Update", JOptionPane.INFORMATION_MESSAGE);				}			}			else if(salesPriceUpdate)			{				JOptionPane.showMessageDialog(this, "Only Sales Price will be updated!", "Update", JOptionPane.INFORMATION_MESSAGE);			}			else			{				JOptionPane.showMessageDialog(this, "Neither Order Price nor Sales Price will be updated!", "Update", JOptionPane.INFORMATION_MESSAGE);				}									refreshTable();						}					if(cmd.equals("Save"))		{			try    		{    			companyObject.endProgram();    			JOptionPane.showMessageDialog(this, "Saved!", "", JOptionPane.INFORMATION_MESSAGE);    		}    		catch(Exception e)    		{					JOptionPane.showMessageDialog(null, "Saving Error", "File Error", JOptionPane.ERROR_MESSAGE);    		}		}			if(cmd.equals("Sales Data"))		{			jTabbedPaneLayout.setSelectedComponent(jPanelSales);		}						if(cmd.equals("New Orders"))		{			jTabbedPaneLayout.setSelectedComponent(jPanelOrders);		}					if(cmd.equals("Liquidation"))		{			jTabbedPaneLayout.setSelectedComponent(jPanelLiquidate);		}				if(cmd.equals("New Item"))		{			jTabbedPaneLayout.setSelectedComponent(jPanelNewItem);		}		

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
中文字幕一区二区三区蜜月| 亚洲欧洲综合另类| 色婷婷精品久久二区二区蜜臂av| 日韩专区欧美专区| 国产午夜精品久久久久久免费视| 欧美偷拍一区二区| 豆国产96在线|亚洲| 日韩av成人高清| 亚洲欧美视频在线观看视频| 久久在线观看免费| 欧美精品1区2区3区| 成人激情动漫在线观看| 久草在线在线精品观看| 亚洲国产成人高清精品| 亚洲人成7777| 国产蜜臀97一区二区三区| 欧美日韩国产首页在线观看| av电影在线观看完整版一区二区| 精品一区二区三区在线视频| 天天影视涩香欲综合网| 亚洲精品乱码久久久久久久久| 久久久99免费| 久久综合九色综合97婷婷女人 | 国产一区二区看久久| 亚洲图片欧美色图| 亚洲女女做受ⅹxx高潮| 亚洲欧洲成人精品av97| 日本一区二区视频在线| 久久久不卡影院| 久久久久国色av免费看影院| 亚洲精品一区二区精华| 欧美一级片在线看| 91麻豆精品久久久久蜜臀| 欧美日韩卡一卡二| 欧美午夜一区二区三区| 色呦呦国产精品| 99国内精品久久| 91麻豆视频网站| 色综合天天综合狠狠| 色网综合在线观看| 色婷婷av一区二区三区gif| 91在线精品秘密一区二区| 99久久婷婷国产综合精品电影| 国产成人一级电影| 高清shemale亚洲人妖| 处破女av一区二区| av一二三不卡影片| 日本韩国一区二区三区视频| 91福利视频久久久久| 精品视频1区2区| 3d成人h动漫网站入口| 日韩午夜精品电影| 精品国产伦一区二区三区免费| 精品国产乱码久久久久久夜甘婷婷 | 亚洲人成精品久久久久久| 亚洲蜜臀av乱码久久精品| 亚洲综合激情另类小说区| 亚洲成人777| 精品在线免费观看| 床上的激情91.| 欧美性大战xxxxx久久久| 6080国产精品一区二区| 欧美精品一区男女天堂| 中文字幕第一区二区| 成人免费在线视频| 婷婷久久综合九色国产成人| 韩国欧美国产1区| 成人免费高清在线观看| 日本道精品一区二区三区| 欧美日本在线播放| 久久亚洲一区二区三区明星换脸| 国产精品丝袜久久久久久app| 中文字幕在线一区| 婷婷开心激情综合| 国产91精品欧美| 欧美午夜精品久久久久久孕妇| 欧美一区二区三区四区在线观看| 久久精品一区蜜桃臀影院| 成人免费一区二区三区在线观看| 婷婷久久综合九色综合伊人色| 国产伦精品一区二区三区在线观看| 99久久婷婷国产精品综合| 日韩欧美一区二区在线视频| 国产精品久久久久影院| 婷婷夜色潮精品综合在线| 国产成人免费xxxxxxxx| 欧美色老头old∨ideo| 欧美xxxx老人做受| 一区二区三区日韩欧美精品| 开心九九激情九九欧美日韩精美视频电影| 成人成人成人在线视频| 欧美精品在线观看一区二区| 国产精品色哟哟网站| 日韩成人伦理电影在线观看| 丁香网亚洲国际| 欧美一区二区久久| 亚洲综合视频在线观看| 国产成人亚洲精品狼色在线| 欧美喷潮久久久xxxxx| 欧美国产97人人爽人人喊| 日本成人在线电影网| 99re66热这里只有精品3直播| 精品国产乱码久久久久久久| 亚洲午夜影视影院在线观看| 99视频精品在线| 久久综合狠狠综合| 日本亚洲视频在线| 在线亚洲免费视频| 国产精品久久久久影院色老大| 久久国产剧场电影| 欧美肥妇bbw| 亚洲国产一区二区a毛片| bt7086福利一区国产| 精品国产1区2区3区| 日韩av中文字幕一区二区| 色琪琪一区二区三区亚洲区| 中文字幕第一区二区| 国产在线不卡一卡二卡三卡四卡| 欧美日韩国产一级片| 亚洲一区二区三区在线| 91视频观看视频| 国产精品久久久久桃色tv| 国产曰批免费观看久久久| 日韩欧美一级二级三级| 日韩精品视频网站| 欧美日韩免费高清一区色橹橹| 亚洲欧美一区二区三区久本道91| 成人av手机在线观看| 中文在线免费一区三区高中清不卡| 精品无人区卡一卡二卡三乱码免费卡| 欧美高清你懂得| 天天av天天翘天天综合网色鬼国产| 91久久一区二区| 一区二区三区欧美日| 91成人在线观看喷潮| 亚洲综合丝袜美腿| 欧美日本一区二区三区四区| 性做久久久久久免费观看| 欧美巨大另类极品videosbest| 偷窥国产亚洲免费视频| 欧美一区二区三区在线观看| 蜜臀av一区二区在线观看| 欧美电视剧在线看免费| 久久99国产精品免费网站| 国产香蕉久久精品综合网| 从欧美一区二区三区| 亚洲欧美日韩在线播放| 色综合久久天天| 午夜视频一区二区| 日韩一区二区高清| 国产在线日韩欧美| 国产精品久久三| 91黄色免费看| 视频一区欧美日韩| 亚洲精品在线观看网站| 国产成人av一区| 亚洲欧美国产高清| 欧美在线看片a免费观看| 午夜激情综合网| 亚洲精品一区二区三区在线观看| 国产一区91精品张津瑜| 国产精品电影院| 欧美日韩和欧美的一区二区| 久久精品国内一区二区三区| 国产亚洲1区2区3区| 色婷婷av久久久久久久| 美女爽到高潮91| 日本一区二区成人在线| 欧美午夜视频网站| 国产一区二区三区四区五区美女 | 欧美激情中文字幕| 欧美在线你懂得| 国产一区二区三区视频在线播放| 最新国产成人在线观看| 制服视频三区第一页精品| 国产精品影视天天线| 一区二区三区不卡在线观看| 日韩免费电影网站| av中文一区二区三区| 丝袜国产日韩另类美女| 国产精品久久久久婷婷| 91精品国产色综合久久不卡电影| 成人美女在线视频| 石原莉奈在线亚洲二区| 国产日韩精品久久久| 欧美日韩在线一区二区| 国产91丝袜在线播放| 日韩在线一区二区三区| 亚洲欧美偷拍三级| 国产亚洲精品aa| 日韩欧美国产小视频| 91福利社在线观看| 成人一区二区三区视频 | 五月天久久比比资源色| 国产人成亚洲第一网站在线播放| 欧美另类高清zo欧美| www.色精品| 国产一区二区美女诱惑| 日韩国产在线观看一区| 一区二区三区日韩|