Hi,

I am currently developing a cafe ordering and payment system which i encounter some calculation issue... i need a formula which is able to calculate the total price in this scenario, If Customer A order 5 items of different prices and Customer B order 9 items of different price, is there a way which a formula can add up all(no matter 2 or more item) items? Please help...

Thanks

I would like you to detail on your question. What do you want to do exactly when you say that whether the items cadn be added up?

Hi,

I have this order component which store my order in a jTable, the field are namely, Name, Qty, Size, Unit Price and Subtotal. What i wish to achieve is to sum up the subtotal column. so i could get a total price... and store the total in a variable and display as a jLabel... Thanks

since I don't know your code, this is just the concept, not the right code
add all your 'products' into an array of the type product and add the sum

Product[] list = getChosenProducts();
int total = 0;
String toPrint = "";
for ( int i = 0; i < list.length; i++){
    toPrint += list[i].toString();
    total += list[i].getSum();
}
toPrint += "/n/nTotal amount: " + total;

I assume you have rows of JTable filled with different such orders having the attributes you just mentioned, each with a subtotal of it's own, you now have to make a grand total summing up all the sub totals.
To do this you would have to run through the JTable collecting all the subtotals and keeping on adding them to get a grand total, I don't think there's an automated way to do that.

Hi,

I think u got what i meant.. but isn't there a way to sum up a column of value? Cause i am really unsure of this, so i wish to find out more.. Thanks....

No, I don't think so. The reason is JTable is UI component for the user to view things in a tabular format and not for performing business logic on the values in it.
Since the values themselves might come from a database, you might have the option of getting the sum of the columns from the database itself and then show it in the grand total column.

Hi, i totally understand what you are trying to say... Initially i was thinking of retrieve those figure from the DB for the calculation part, but then how i could code it in a way that it will calculate in the specific range of data i want? Thanks again for those helpful comment

Can you define range ?

What i mean is if my DB contain 100s of record, and i just wan a range of 10 record from any part of the table... Does this sounds clearer? Thanks once again!!!!!

If you know the elements that classify the range then it isn't too complex, while running through JTable collecting sub-totals you just need to check whether the particular item classifies for the range and if it does you add it's sub-total to the grand total.
If I have assumned something wrong over here, correct me.

What u mean is to have a element to group up the range which i am trying to focus on? I have a field for Table No. and Time, is it possible to use this two element as the source for the classification so as to get the range i am looking for? Thanks.... but, how could this be done? could you provide some clue for me? Appreciate that!! =)

Can you detail on this and explain with an example cause I somehow get the feeling that I haven't understood you completely.

Hi, i manage to grab those data from a arraylist and add up the total... Thanks for all the help... =)

Heres my code please help i hava a problem in calculating the "Stock"the multiply it to the Price after that it will came out to the amount..i wan to use JButton in this Inventory system please help me i need it after 1 day...tnx a lot..

/*----------Toyota Company Inventory System--------*/

 import java.awt.*; 
 import javax.swing.*; 
 import javax.swing.event.*; 
 import java.awt.event.*;
 import javax.swing.JScrollPane;
 import javax.swing.ImageIcon;
 import javax.swing.JTextArea;

 public class Toyota extends JFrame 
 { 
 
//--DECLARATION OF VARIABLES	
 	private JTabbedPane MainTab; 
 	private JPanel contentPane;
 	private JLabel adshome; 
 	private JPanel HomePanel; 
  	private JLabel lblhomelogo;
   	private JTextArea histo ;
   	private JScrollPane areaScrollPane;
   	
   	private JScrollPane	janScrollPane;
   	private JScrollPane	febScrollPane;
   	private JScrollPane	marchScrollPane;
   	private JScrollPane	aprScrollPane;
   	private JScrollPane	mayScrollPane;
   	private JScrollPane	junScrollPane;
   	private JScrollPane	julScrollPane;
   	private JScrollPane	augScrollPane;
   	private JScrollPane	sepScrollPane;
   	private JScrollPane	octoScrollPane;
   	private JScrollPane decScrollPane;
   	private JTabbedPane jTabbedPane4; 
 	private JLabel lbltotal; 
 	private JLabel lblamount; 
 	private JTextField txtamount; 
 		private JTextArea textArea;	
 	private JTextField filterText;
    private JTextField statusText;
 	

 	private JTextField txttotal; 
 	private JTextArea Jtxtareaorders; 
 	private JScrollPane orderscroll; 
 		private JButton calbutton; 
 	private JButton okbutton; 
 	private JPanel TransactPanel; 
 	
 	private JPanel GalleryPanel;
 	private JScrollPane scrollPane;
 	private JLabel lblgallerylogo;
 	private JLabel lblgallery1;
 	private JLabel lblgallery2;
 	private JLabel lblgallery3;
 	private JLabel lblgallery4;
 	private JLabel lblgallery5;
 	private JLabel lblgallery6;
 	private JLabel lblgallery7;
 	private JLabel lblgallery8;
 	private JLabel lblgallery9;
 	private JLabel lblgallery10;
 	private JLabel lblgallery11;
 	private JLabel lblgallery12;
 	private JLabel lblgallery13;
 	private JLabel lblgallery14;
 	private JLabel lblgallery15;
 	 														
  
 	private JPanel AboutPanel; 
	private JLabel lblfelmz;		
 	private JLabel lblmerz; 
  	private JLabel lblFc;
 	private JLabel lblMc;	
 	private JTextArea farea;
 	private JTextArea Marea;
  	private JTextArea txtareaAboutUs; 
 	private JScrollPane aboutscroll;  
 
 	private JPanel JunePanel; 
   	private JCheckBox chkpizza1; 
 	private JCheckBox chkpizza2; 
 	private JCheckBox chkpizza3; 
 	private JCheckBox chkpizza4; 
 	private JLabel lblpizzalogo; 
 	private JLabel lblpricepizza; 
 	private JLabel lblqtypizza; 
 	private JLabel lblprice_pizza1; 
 	private JTextField txtqty_pizza1;
 	private JLabel lblprice_pizza2; 
 	private JTextField txtqty_pizza2; 
 	private JLabel lblprice_pizza3; 
 	private JTextField txtqty_pizza3;
	private JLabel lblprice_pizza4; 
 	private JTextField txtqty_pizza4; 

 	private JPanel JulyPanel; 
 	private JLabel lblpastalogo; 
 	private JLabel lblpricepasta; 
 	private JLabel lblqtypasta;
 	private JLabel lblprice_pasta1; 
 	private JCheckBox chkpasta1; 
 	private JTextField txtqty_pasta1; 
 	private JLabel lblprice_pasta2; 
 	private JCheckBox chkpasta2; 
 	private JTextField txtqty_pasta2; 
 	private JLabel lblprice_pasta3; 
 	private JCheckBox chkpasta3; 
 	private JTextField txtqty_pasta3;
 	private JLabel lblprice_pasta4; 
 	private JCheckBox chkpasta4; 
 	private JTextField txtqty_pasta4;  
  
 	private JPanel AugustPanel; 
 	private JLabel lbllogoappetizer; 
 	private JLabel lblpriceappetizer; 
 	private JLabel lblqtyappetizer;
 	private JLabel lblprice_appetizer1; 
 	private JCheckBox chkappetizer1; 
 	private JTextField txtqty_appetizer1; 
 	private JLabel lblprice_appetizer2; 
 	private JCheckBox chkappetizer2; 
 	private JTextField txtqty_appetizer2; 
 	private JLabel lblprice_appetizer3; 
 	private JCheckBox chkappetizer3; 
 	private JTextField txtqty_appetizer3;
 	private JLabel lblprice_appetizer4; 
 	private JCheckBox chkappetizer4; 
 	private JTextField txtqty_appetizer4;  

 	private JPanel SeptemberPanel; 
 	private JLabel lbllogosalad; 
 	private JLabel lblpricesalad; 
 	private JLabel lblqtysalad;
 	private JLabel lblprice_salad1; 
 	private JCheckBox chksalad1; 
 	private JTextField txtqty_salad1; 
 	private JLabel lblprice_salad2; 
 	private JCheckBox chksalad2; 
 	private JTextField txtqty_salad2; 
 	private JLabel lblprice_salad3; 
 	private JCheckBox chksalad3; 
 	private JTextField txtqty_salad3; 

 	private JPanel OctoberPanel; 
 	private JLabel lblbeveragelogo; 
 	private JLabel lblqtybeverage; 
 	private JLabel lblpricebeverage; 
 	private JLabel lblprice_beverage1; 
 	private JCheckBox chkbeverage1; 
 	private JTextField txtqty_beverage1; 
 	private JLabel lblprice_beverage2; 
 	private JCheckBox chkbeverage2; 
 	private JTextField txtqty_beverage2; 
 	private JLabel lblprice_beverage3; 
 	private JCheckBox chkbeverage3; 
 	private JTextField txtqty_beverage3; 
 	private JLabel lblprice_beverage4; 
 	private JCheckBox chkbeverage4; 
 	private JTextField txtqty_beverage4;
 	String psta1;
 	double psta111; 	
 		
 	private JPanel NovemberPanel;
 	private JPanel DecemberPanel; 
 	private JPanel JanuaryPanel; 
 	private JPanel FebruaryPanel; 
 	private JPanel MarchPanel; 
 	private JPanel AprilPanel; 
 	private JPanel MayPanel; 
  
 	public Toyota()
 	{ 
 		super(); 
 		initializeComponent(); 
 		// 
 		// TODO: Add any constructor code after initializeComponent call 
 		// 
  
 		this.setVisible(true); 
 	}
  
//--INITIALIZATION

 	private void initializeComponent() 
 	{ 
 		MainTab = new JTabbedPane(); 
 		contentPane = (JPanel)this.getContentPane(); 
 			
 	//--HOMEPANEL
 	    adshome=new JLabel();
 		HomePanel = new JPanel(); 
 	//-----
 		lblhomelogo=new JLabel();
 		
 		histo=new JTextArea("The Toyota Motor Company received its first Japanese Quality Control Award at the start of the 1980s"+
 	    	           "and began participating in a wide variety of motorsports. Due to the 1973 oil crisis, consumers in the"+
 	    	           "lucrative U.S. market began turning to small cars with better fuel economy. American car manufacturers"+ 
 	    	           "had considered small economy cars to be an entry leve product, and their small vehicles employed a low"+ 
 	    	           "level of quality in order to keep the price low."+
 	    	           "In 1982, the Toyota Motor Company and Toyota Motor Sales merged into one company, the Toyota"+ 
					   "Motor Corporation. Two years later, Toyota entered into a joint venture with GM called NUMMI, the"+ 
					   "New United Motor Manufacturing, Inc, operating an automobile-manufacturing plant in Fremont, California."+ 
					   "The factory was an old General Motors plant that had been closed for two years. Toyota then started to"+ 
					   "establish new brands at the end of the 1980s, with the launch of their luxury division Lexus in 1989."+		
 					   "In the 1990s, Toyota began to branch out from producing mostly compact cars by adding many larger and more"+ 
 					   "luxurious vehicles to its lineup, including a full-sized pickup, the T100 (and later the Tundra); several"+ 
 					   "lines of SUVs; a sport version of the Camry, known as the Camry Solara; and the Scion brand, a group of several"+
 					   "affordable, yet sporty, automobiles targeted specifically to young adults. Toyota also began production of the"+ 
 					   "world's best-selling hybrid car, the Prius, in 1997."+
 					   "With a major presence in Europe, due to the success of Toyota Team Europe, the corporation decided to set up TMME,"+
 					   "Toyota Motor Europe Marketing & Engineering, to help market vehicles in the continent. Two years later, Toyota set"+ 
 					   "up a base in the United Kingdom, TMUK, as the company's cars had become very popular among British drivers. Bases"+ 
 					   "in Indiana, Virginia and Tianjin were also set up. In 1999, the company decided to list itself on the New York and"+
 					   "London Stock Exchange. In 2001, Toyota's Toyo Trust and Banking merged to form the UFJ, United Financials of Japan,"+
 					   "which was accused of corruption by the Japan's government for making bad loans to alleged Yakuza crime syndicates"+ 
 					   "with executives accused of blocking Financial Service Agency inspections.[18] The UFJ was listed among Fortune"+ 
 					   "Magazine's largest money-losing corporations in the world, with Toyota's chairman serving as a director.[19] At the"+
 					   "time, the UFJ was one of the largest shareholders of Toyota. As a result of Japan's banking crisis, the UFJ was"+
 					   "merged again to become Mitsubishi UFJ Financial Group.In 2002, Toyota managed to enter a Formula One works team and"+ 
 					   "establish joint ventures with French motoring companies Citroën and Peugeot, a year after Toyota started producing"+ 
 					   "cars in France.Toyota ranked eighth on Forbes 2000 list of the world's leading companies for the year 2005. The company"+
 					   "was number one in global automobile sales for the first quarter of 2008.On December 7, 2004, a U.S. press release was"+
 					   "issued stating that Toyota would be offering Sirius Satellite Radios. However, as late as January 27, 2007, Sirius"+
 					   "Satellite Radio and XM Satellite radio kits were not available for Toyota factory radios.[citation needed] While the"+
 					   "press release enumerated nine models, only limited availability existed at the dealer level in the U.S. As of 2008, all"+
 					   "Toyota and Scion models have either standard or available XM radio kits. Major Lexus dealerships have been offering"+ 
 					   "satellite radio kits for Lexus vehicles since 2005, in addition to factory-equipped satellite radio models.In 2007,"+ 
 					   "Toyota released an update of its full size truck, the Tundra, produced in two American factories, one in Texas and one"+ 
 					   "in Indiana. Motor Trend  named the Tundra Truck of the Year, and the 2007 Toyota Camry Car of the Year for 2007."+ 
 					   "It also began the construction of two new factories, one to build the RAV4 in Woodstock, Ontario, Canada and the other"+ 
 					   "to build the Toyota Prius in Blue Springs, Mississippi, USA. This plant was originally intended to build the Toyota"+ 
 					   "Highlander, but Toyota decided to use the plant in Princeton, Indiana, USA instead. The company has also found recent"+
 					   "success with its smaller models - the Corolla and Yaris - as gas prices have risen rapidly in the last few years.");
          histo.setEnabled(false);
 		
 	//--TRANSACTPANEL
 		lbltotal = new JLabel(); 
 		lblamount = new JLabel(); 
 		txtamount = new JTextField(); 
		calbutton = new JButton(); 
 		okbutton = new JButton(); 
 		txttotal = new JTextField(); 
 		Jtxtareaorders = new JTextArea(); 
 		orderscroll = new JScrollPane(); 
 		jTabbedPane4 = new JTabbedPane(); 
 		TransactPanel = new JPanel(); 
 	//--GALLERYPANEL 
 	    
 	    scrollPane = new JScrollPane(); 
 		GalleryPanel = new JPanel(new BorderLayout());
 		GalleryPanel.setBackground(Color.black);
 		
 		

 		
 		lblgallerylogo = new JLabel();
 		lblgallery1 = new JLabel();
 		lblgallery2 = new JLabel();
 		lblgallery3 = new JLabel();
 		lblgallery4 = new JLabel();
 		lblgallery5 = new JLabel();
 		lblgallery6 = new JLabel();
 		lblgallery7 = new JLabel();
 		lblgallery8 = new JLabel();
 		lblgallery9 = new JLabel();
 		lblgallery10 = new JLabel();
 		lblgallery11 = new JLabel();
 		lblgallery12 = new JLabel();
 		lblgallery13 = new JLabel();
 		lblgallery14 = new JLabel();
 		lblgallery15 = new JLabel();
 	
 			
 			
 	                           
		scrollPane.setBackground(Color.WHITE);
		scrollPane.setForeground(Color.BLACK);    
        		   
        	
 			
 			
 					 
 	//---ABOUTPANEL
 		AboutPanel = new JPanel();
 		AboutPanel.setBackground(Color.black); 
  		lblfelmz = new JLabel(); 
 		lblmerz = new JLabel();
 		txtareaAboutUs = new JTextArea("At last! The efforts and hardships of making this Inventory "+ 
 			                           "\nSystem of such company like Toyota had done and came up  "+
 			                           "\nwith a great conclusion. The Time and financial expenses "+
 			                           "\nis also considered to provide the requirements that's "+
 			                           "\nneeded to meet its completion."+
 			                           "\n\nThis Inventory System will be a to the help the user to monitor "+
 			                           "\nof the Sales including the Transactions envolved within the "+
 			                           "\nthe flow  company as well as the customer. Both parties will be  "+
 			                           "\nthe benefeciary for the input and ouput of the application"+
 			                           "\n concerning to their privacy and identity."+
 			                           	"\n\n\n\tAll Rights Copyright Reserved @ 2009");
 		txtareaAboutUs.setEnabled(false);
 		aboutscroll = new JScrollPane();
 
 	//--JUNEPANEL
 		JunePanel = new JPanel(); 
 		JunePanel.setBackground(new Color(191, 6, 6));
 		 	 
 		String[] columns1 = {"Stock","Make","Price","Model","Ext. Color","Amount"};
 		 Object[][] cells1 = {{"5","Toyota Altima","2,500,000.00","GE","Platinum","125,000,000.00"},
                                     {"6","Toyota Camry","4,500,000.00","SW","Platinum","27,000,000.00"},
                                     {"5","Toyota Prius","3,500,000.00","SS","Platinum","17,500,000.00"},
                                     {"2","Toyota Sienna","4,500,000.00","EF","Platinum","9,000,000.00"},
                                     {"2","Toyota Highlander","6,500,000.00","DE","Platinum","13,000,000.00"},
                                     {"3","Toyota Highlander","6,500,000.00","WS","Platinum","19,500,000.00"},
                                     {"4","Toyota Highlander","6,500,000.00","RG","Platinum","26,000,000.00"},
                                     {"8","Toyota Highlander","6,500,000.00","FE","Platinum","52,000,000.00"},
                                     {"7","Toyota Highlander","6,500,000.00","XE","Platinum","45,500,000.00"},
                                     {"6","Toyota Highlander","6,500,000.00","VR","Platinum","45,500,000.00"},
                                     {"1","Toyota Highlander","6,500,000.00","SW","Platinum","6,500,000.00"},
                                     {"7","Toyota Corolla","7,500,000.00","XD","Platinum","52,500,000.00"},
                                     {"4","Toyota Corolla","7,500,000.00","EW","Platinum","30,000,000.00"},
                                     {"5","Toyota Corolla","7,500,000.00","ZX","Platinum","37,500,000.00"},
                                     {"7","Toyota Corolla","7,500,000.00","BD","Platinum","52,500,000.00"},
                                     {"7","Toyota Corolla","6,500,000.00","VFE","Platinum","45,500,000.00"}};
        JTable juntable = new JTable(cells1,columns1);	 
 		 	 		 		
 
	//--JULYPANEL
 		JulyPanel = new JPanel(); 
 		JulyPanel.setBackground(new Color(191, 6, 6));
 	
 		String[] columns2 = {"Stock","Make","Price","Model","Ext. Color","Amount"};
 		 Object[][] cells2 = {{"5","Toyota Altima","P2,500,000.00","GE","Platinum","125,000,000.00",new Integer(5), new Boolean(false)},
                                     {"6","Toyota Camry","P4,500,000.00","SW","Platinum","27,000,000.00"},
                                     {"5","Toyota Prius","P3,500,000.00","SS","Platinum","17,500,000.00"},
                                     {"2","Toyota Sienna","P4,500,000.00","EF","Platinum","9,000,000.00"},
                                     {"2","Toyota Highlander","P6,500,000.00","DE","Platinum","13,000,000.00"},
                                     {"3","Toyota Highlander","P6,500,000.00","WS","Platinum","19,500,000.00"},
                                     {"4","Toyota Highlander","P6,500,000.00","RG","Platinum","26,000,000.00"},
                                     {"8","Toyota Highlander","P6,500,000.00","FE","Platinum","52,000,000.00"},
                                     {"7","Toyota Highlander","P6,500,000.00","XE","Platinum","45,500,000.00"},
                                     {"6","Toyota Highlander","P6,500,000.00","VR","Platinum","45,500,000.00"},
                                     {"1","Toyota Highlander","P6,500,000.00","SW","Platinum","6,500,000.00"},
                                     {"7","Toyota Corolla","P7,500,000.00","XD","Platinum","52,500,000.00"},
                                     {"4","Toyota Corolla","P7,500,000.00","EW","Platinum","30,000,000.00"},
                                     {"5","Toyota Corolla","P7,500,000.00","ZX","Platinum","37,500,000.00"},
                                     {"7","Toyota Corolla","P7,500,000.00","BD","Platinum","52,500,000.00"},
                                     {"7","Toyota Corolla","P6,500,000.00","VFE","Platinum","45,500,000.00"}};
        JTable jultable = new JTable(cells2,columns2);
        
       		
 	//---AUGUSTPANEL
 		AugustPanel = new JPanel(); 
 		AugustPanel.setBackground(new Color(191, 6, 6));
 	
 		String[] columns3 = {"Stock","Make","Price","Model","Ext. Color","Amount"};
 		 Object[][] cells3 = {{"5","Toyota Altima","P2,500,000.00","GE","Platinum","125,000,000.00",new Integer(5), new Boolean(false)},
                                     {"6","Toyota Camry","P4,500,000.00","SW","Platinum","27,000,000.00"},
                                     {"5","Toyota Prius","P3,500,000.00","SS","Platinum","17,500,000.00"},
                                     {"2","Toyota Sienna","P4,500,000.00","EF","Platinum","9,000,000.00"},
                                     {"2","Toyota Highlander","P6,500,000.00","DE","Platinum","13,000,000.00"},
                                     {"3","Toyota Highlander","P6,500,000.00","WS","Platinum","19,500,000.00"},
                                     {"4","Toyota Highlander","P6,500,000.00","RG","Platinum","26,000,000.00"},
                                     {"8","Toyota Highlander","P6,500,000.00","FE","Platinum","52,000,000.00"},
                                     {"7","Toyota Highlander","P6,500,000.00","XE","Platinum","45,500,000.00"},
                                     {"6","Toyota Highlander","P6,500,000.00","VR","Platinum","45,500,000.00"},
                                     {"1","Toyota Highlander","P6,500,000.00","SW","Platinum","6,500,000.00"},
                                     {"7","Toyota Corolla","P7,500,000.00","XD","Platinum","52,500,000.00"},
                                     {"4","Toyota Corolla","P7,500,000.00","EW","Platinum","30,000,000.00"},
                                     {"5","Toyota Corolla","P7,500,000.00","ZX","Platinum","37,500,000.00"},
                                     {"7","Toyota Corolla","P7,500,000.00","BD","Platinum","52,500,000.00"},
                                     {"7","Toyota Corolla","P6,500,000.00","VFE","Platinum","45,500,000.00"}};
        JTable augtable = new JTable(cells3,columns3);
        
 
 		
 	//---SEPTEMBERPANEL
 		SeptemberPanel = new JPanel(); 
 		SeptemberPanel.setBackground(new Color(191, 6, 6));
 		
 		String[] columns4 = {"Stock","Make","Price","Model","Ext. Color","Amount"};
 		 Object[][] cells4 = {{"5","Toyota Altima","P2,500,000.00","GE","Platinum","125,000,000.00",new Integer(5), new Boolean(false)},
                                     {"6","Toyota Camry","P4,500,000.00","SW","Platinum","27,000,000.00"},
                                     {"5","Toyota Prius","P3,500,000.00","SS","Platinum","17,500,000.00"},
                                     {"2","Toyota Sienna","P4,500,000.00","EF","Platinum","9,000,000.00"},
                                     {"2","Toyota Highlander","P6,500,000.00","DE","Platinum","13,000,000.00"},
                                     {"3","Toyota Highlander","P6,500,000.00","WS","Platinum","19,500,000.00"},
                                     {"4","Toyota Highlander","P6,500,000.00","RG","Platinum","26,000,000.00"},
                                     {"8","Toyota Highlander","P6,500,000.00","FE","Platinum","52,000,000.00"},
                                     {"7","Toyota Highlander","P6,500,000.00","XE","Platinum","45,500,000.00"},
                                     {"6","Toyota Highlander","P6,500,000.00","VR","Platinum","45,500,000.00"},
                                     {"1","Toyota Highlander","P6,500,000.00","SW","Platinum","6,500,000.00"},
                                     {"7","Toyota Corolla","P7,500,000.00","XD","Platinum","52,500,000.00"},
                                     {"4","Toyota Corolla","P7,500,000.00","EW","Platinum","30,000,000.00"},
                                     {"5","Toyota Corolla","P7,500,000.00","ZX","Platinum","37,500,000.00"},
                                     {"7","Toyota Corolla","P7,500,000.00","BD","Platinum","52,500,000.00"},
                                     {"7","Toyota Corolla","P6,500,000.00","VFE","Platinum","45,500,000.00"}};
        JTable septable = new JTable(cells4,columns4);
        
 	 		
 	//---OCTOBERPANEL
 		OctoberPanel = new JPanel(); 
 		OctoberPanel.setBackground(new Color(191, 6, 6));
 	
 		String[] columns5 = {"Stock","Make","Price","Model","Ext. Color","Amount"};
 	    Object[][] cells5 = {{"5","Toyota Altima","P2,500,000.00","GE","Platinum","125,000,000.00",new Integer(5), new Boolean(false)},
                                     {"6","Toyota Camry","P4,500,000.00","SW","Platinum","27,000,000.00"},
                                     {"5","Toyota Prius","P3,500,000.00","SS","Platinum","17,500,000.00"},
                                     {"2","Toyota Sienna","P4,500,000.00","EF","Platinum","9,000,000.00"},
                                     {"2","Toyota Highlander","P6,500,000.00","DE","Platinum","13,000,000.00"},
                                     {"3","Toyota Highlander","P6,500,000.00","WS","Platinum","19,500,000.00"},
                                     {"4","Toyota Highlander","P6,500,000.00","RG","Platinum","26,000,000.00"},
                                     {"8","Toyota Highlander","P6,500,000.00","FE","Platinum","52,000,000.00"},
                                     {"7","Toyota Highlander","P6,500,000.00","XE","Platinum","45,500,000.00"},
                                     {"6","Toyota Highlander","P6,500,000.00","VR","Platinum","45,500,000.00"},
                                     {"1","Toyota Highlander","P6,500,000.00","SW","Platinum","6,500,000.00"},
                                     {"7","Toyota Corolla","P7,500,000.00","XD","Platinum","52,500,000.00"},
                                     {"4","Toyota Corolla","P7,500,000.00","EW","Platinum","30,000,000.00"},
                                     {"5","Toyota Corolla","P7,500,000.00","ZX","Platinum","37,500,000.00"},
                                     {"7","Toyota Corolla","P7,500,000.00","BD","Platinum","52,500,000.00"},
                                     {"7","Toyota Corolla","P6,500,000.00","VFE","Platinum","45,500,000.00"}};
        JTable octotable = new JTable(cells5,columns5);
        
  			
 	//---NOVEMBERPANEL
 		NovemberPanel = new JPanel(); 
 		NovemberPanel.setBackground(new Color(191, 6, 6));
 		
 		String[] columns = {"Stock","Make","Price","Model","Ext. Color","Amount"};
 		 Object[][] cells = {{"5","Toyota Altima","P2,500,000.00","GE","Platinum","125,000,000.00",new Integer(5), new Boolean(false)},
                                     {"6","Toyota Camry","P4,500,000.00","SW","Platinum","27,000,000.00"},
                                     {"5","Toyota Prius","P3,500,000.00","SS","Platinum","17,500,000.00"},
                                     {"2","Toyota Sienna","P4,500,000.00","EF","Platinum","9,000,000.00"},
                                     {"2","Toyota Highlander","P6,500,000.00","DE","Platinum","13,000,000.00"},
                                     {"3","Toyota Highlander","P6,500,000.00","WS","Platinum","19,500,000.00"},
                                     {"4","Toyota Highlander","P6,500,000.00","RG","Platinum","26,000,000.00"},
                                     {"8","Toyota Highlander","P6,500,000.00","FE","Platinum","52,000,000.00"},
                                     {"7","Toyota Highlander","P6,500,000.00","XE","Platinum","45,500,000.00"},
                                     {"6","Toyota Highlander","P6,500,000.00","VR","Platinum","45,500,000.00"},
                                     {"1","Toyota Highlander","P6,500,000.00","SW","Platinum","6,500,000.00"},
                                     {"7","Toyota Corolla","P7,500,000.00","XD","Platinum","52,500,000.00"},
                                     {"4","Toyota Corolla","P7,500,000.00","EW","Platinum","30,000,000.00"},
                                     {"5","Toyota Corolla","P7,500,000.00","ZX","Platinum","37,500,000.00"},
                                     {"7","Toyota Corolla","P7,500,000.00","BD","Platinum","52,500,000.00"},
                                     {"7","Toyota Corolla","P6,500,000.00","VFE","Platinum","45,500,000.00"}};
        JTable novtable = new JTable(cells,columns);
         
   //---DECEMBERPANEL
 		DecemberPanel = new JPanel(); 
 		DecemberPanel.setBackground(new Color(191, 6, 6));
 
 		String[] columns7 = {"Stock","Make","Price","Model","Ext. Color","Amount"};
 		Object[][] cells7 = {{"5","Toyota Altima","P2,500,000.00","GE","Platinum","125,000,000.00",new Integer(5), new Boolean(false)},
                                     {"6","Toyota Camry","P4,500,000.00","SW","Platinum","27,000,000.00"},
                                     {"5","Toyota Prius","P3,500,000.00","SS","Platinum","17,500,000.00"},
                                     {"2","Toyota Sienna","P4,500,000.00","EF","Platinum","9,000,000.00"},
                                     {"2","Toyota Highlander","P6,500,000.00","DE","Platinum","13,000,000.00"},
                                     {"3","Toyota Highlander","P6,500,000.00","WS","Platinum","19,500,000.00"},
                                     {"4","Toyota Highlander","P6,500,000.00","RG","Platinum","26,000,000.00"},
                                     {"8","Toyota Highlander","P6,500,000.00","FE","Platinum","52,000,000.00"},
                                     {"7","Toyota Highlander","P6,500,000.00","XE","Platinum","45,500,000.00"},
                                     {"6","Toyota Highlander","P6,500,000.00","VR","Platinum","45,500,000.00"},
                                     {"1","Toyota Highlander","P6,500,000.00","SW","Platinum","6,500,000.00"},
                                     {"7","Toyota Corolla","P7,500,000.00","XD","Platinum","52,500,000.00"},
                                     {"4","Toyota Corolla","P7,500,000.00","EW","Platinum","30,000,000.00"},
                                     {"5","Toyota Corolla","P7,500,000.00","ZX","Platinum","37,500,000.00"},
                                     {"7","Toyota Corolla","P7,500,000.00","BD","Platinum","52,500,000.00"},
                                     {"7","Toyota Corolla","P6,500,000.00","VFE","Platinum","45,500,000.00"}};
        JTable dectable = new JTable(cells7,columns7);
        
    //---JANUARYPANEL
 		JanuaryPanel = new JPanel(); 
 		JanuaryPanel.setBackground(new Color(191, 6, 6));
 
 		String[] columns8 = {"Stock","Make","Price","Model","Ext. Color","Amount"};
 		Object[][] cells8 = {{"5","Toyota Altima","P2,500,000.00","GE","Platinum","125,000,000.00",new Integer(5), new Boolean(false)},
                                     {"6","Toyota Camry","P4,500,000.00","SW","Platinum","27,000,000.00"},
                                     {"5","Toyota Prius","P3,500,000.00","SS","Platinum","17,500,000.00"},
                                     {"2","Toyota Sienna","P4,500,000.00","EF","Platinum","9,000,000.00"},
                                     {"2","Toyota Highlander","P6,500,000.00","DE","Platinum","13,000,000.00"},
                                     {"3","Toyota Highlander","P6,500,000.00","WS","Platinum","19,500,000.00"},
                                     {"4","Toyota Highlander","P6,500,000.00","RG","Platinum","26,000,000.00"},
                                     {"8","Toyota Highlander","P6,500,000.00","FE","Platinum","52,000,000.00"},
                                     {"7","Toyota Highlander","P6,500,000.00","XE","Platinum","45,500,000.00"},
                                     {"6","Toyota Highlander","P6,500,000.00","VR","Platinum","45,500,000.00"},
                                     {"1","Toyota Highlander","P6,500,000.00","SW","Platinum","6,500,000.00"},
                                     {"7","Toyota Corolla","P7,500,000.00","XD","Platinum","52,500,000.00"},
                                     {"4","Toyota Corolla","P7,500,000.00","EW","Platinum","30,000,000.00"},
                                     {"5","Toyota Corolla","P7,500,000.00","ZX","Platinum","37,500,000.00"},
                                     {"7","Toyota Corolla","P7,500,000.00","BD","Platinum","52,500,000.00"},
                                     {"7","Toyota Corolla","P6,500,000.00","VFE","Platinum","45,500,000.00"}};
        JTable jantable = new JTable(cells8,columns8);
        
   //---FEBRUARYPANEL
 		FebruaryPanel = new JPanel(); 
 		FebruaryPanel.setBackground(new Color(191, 6, 6));
 
 		String[] columns9 = {"Stock","Make","Price","Model","Ext. Color","Amount"};
 		Object[][] cells9 = {{"5","Toyota Altima","P2,500,000.00","GE","Platinum","125,000,000.00",new Integer(5), new Boolean(false)},
                                     {"6","Toyota Camry","P4,500,000.00","SW","Platinum","27,000,000.00"},
                                     {"5","Toyota Prius","P3,500,000.00","SS","Platinum","17,500,000.00"},
                                     {"2","Toyota Sienna","P4,500,000.00","EF","Platinum","9,000,000.00"},
                                     {"2","Toyota Highlander","P6,500,000.00","DE","Platinum","13,000,000.00"},
                                     {"3","Toyota Highlander","P6,500,000.00","WS","Platinum","19,500,000.00"},
                                     {"4","Toyota Highlander","P6,500,000.00","RG","Platinum","26,000,000.00"},
                                     {"8","Toyota Highlander","P6,500,000.00","FE","Platinum","52,000,000.00"},
                                     {"7","Toyota Highlander","P6,500,000.00","XE","Platinum","45,500,000.00"},
                                     {"6","Toyota Highlander","P6,500,000.00","VR","Platinum","45,500,000.00"},
                                     {"1","Toyota Highlander","P6,500,000.00","SW","Platinum","6,500,000.00"},
                                     {"7","Toyota Corolla","P7,500,000.00","XD","Platinum","52,500,000.00"},
                                     {"4","Toyota Corolla","P7,500,000.00","EW","Platinum","30,000,000.00"},
                                     {"5","Toyota Corolla","P7,500,000.00","ZX","Platinum","37,500,000.00"},
                                     {"7","Toyota Corolla","P7,500,000.00","BD","Platinum","52,500,000.00"},
                                     {"7","Toyota Corolla","P6,500,000.00","VFE","Platinum","45,500,000.00"}};
        JTable febtable = new JTable(cells9,columns9);
             
        
    //---MARCHPANEL
 		MarchPanel = new JPanel(); 
 		MarchPanel.setBackground(new Color(191, 6, 6));
 
 		String[] columns10 = {"Stock","Make","Price","Model","Ext. Color","Amount"};
 		Object[][] cells10 = {{"5","Toyota Altima","P2,500,000.00","GE","Platinum","125,000,000.00",new Integer(5), new Boolean(false)},
                                     {"6","Toyota Camry","P4,500,000.00","SW","Platinum","27,000,000.00"},
                                     {"5","Toyota Prius","P3,500,000.00","SS","Platinum","17,500,000.00"},
                                     {"2","Toyota Sienna","P4,500,000.00","EF","Platinum","9,000,000.00"},
                                     {"2","Toyota Highlander","P6,500,000.00","DE","Platinum","13,000,000.00"},
                                     {"3","Toyota Highlander","P6,500,000.00","WS","Platinum","19,500,000.00"},
                                     {"4","Toyota Highlander","P6,500,000.00","RG","Platinum","26,000,000.00"},
                                     {"8","Toyota Highlander","P6,500,000.00","FE","Platinum","52,000,000.00"},
                                     {"7","Toyota Highlander","P6,500,000.00","XE","Platinum","45,500,000.00"},
                                     {"6","Toyota Highlander","P6,500,000.00","VR","Platinum","45,500,000.00"},
                                     {"1","Toyota Highlander","P6,500,000.00","SW","Platinum","6,500,000.00"},
                                     {"7","Toyota Corolla","P7,500,000.00","XD","Platinum","52,500,000.00"},
                                     {"4","Toyota Corolla","P7,500,000.00","EW","Platinum","30,000,000.00"},
                                     {"5","Toyota Corolla","P7,500,000.00","ZX","Platinum","37,500,000.00"},
                                     {"7","Toyota Corolla","P7,500,000.00","BD","Platinum","52,500,000.00"},
                                     {"7","Toyota Corolla","P6,500,000.00","VFE","Platinum","45,500,000.00"}};
        JTable marchtable = new JTable(cells10,columns10);
            
        
    //---APRILPANEL
 		AprilPanel = new JPanel(); 
 		AprilPanel.setBackground(new Color(191, 6, 6));
 
 		String[] columns11 = {"Stock","Make","Price","Model","Ext. Color","Amount"};
 		Object[][] cells11 = {{"5","Toyota Altima","P2,500,000.00","GE","Platinum","125,000,000.00",new Integer(5), new Boolean(false)},
                                     {"6","Toyota Camry","P4,500,000.00","SW","Platinum","27,000,000.00"},
                                     {"5","Toyota Prius","P3,500,000.00","SS","Platinum","17,500,000.00"},
                                     {"2","Toyota Sienna","P4,500,000.00","EF","Platinum","9,000,000.00"},
                                     {"2","Toyota Highlander","P6,500,000.00","DE","Platinum","13,000,000.00"},
                                     {"3","Toyota Highlander","P6,500,000.00","WS","Platinum","19,500,000.00"},
                                     {"4","Toyota Highlander","P6,500,000.00","RG","Platinum","26,000,000.00"},
                                     {"8","Toyota Highlander","P6,500,000.00","FE","Platinum","52,000,000.00"},
                                     {"7","Toyota Highlander","P6,500,000.00","XE","Platinum","45,500,000.00"},
                                     {"6","Toyota Highlander","P6,500,000.00","VR","Platinum","45,500,000.00"},
                                     {"1","Toyota Highlander","P6,500,000.00","SW","Platinum","6,500,000.00"},
                                     {"7","Toyota Corolla","P7,500,000.00","XD","Platinum","52,500,000.00"},
                                     {"4","Toyota Corolla","P7,500,000.00","EW","Platinum","30,000,000.00"},
                                     {"5","Toyota Corolla","P7,500,000.00","ZX","Platinum","37,500,000.00"},
                                     {"7","Toyota Corolla","P7,500,000.00","BD","Platinum","52,500,000.00"},
                                     {"7","Toyota Corolla","P6,500,000.00","VFE","Platinum","45,500,000.00"}};
        JTable apriltable = new JTable(cells11,columns11);
            
     //---MAYPANEL
 		MayPanel = new JPanel(); 
 		MayPanel.setBackground(new Color(191, 6, 6));
 
 		String[] columns12 = {"Stock","Make","Price","Model","Ext. Color","Amount"};
 		Object[][] cells12 = {{"5","Toyota Altima","P2,500,000.00","GE","Platinum","125,000,000.00",new Integer(5), new Boolean(false)},
                                     {"6","Toyota Camry","P4,500,000.00","SW","Platinum","27,000,000.00"},
                                     {"5","Toyota Prius","P3,500,000.00","SS","Platinum","17,500,000.00"},
                                     {"2","Toyota Sienna","P4,500,000.00","EF","Platinum","9,000,000.00"},
                                     {"2","Toyota Highlander","P6,500,000.00","DE","Platinum","13,000,000.00"},
                                     {"3","Toyota Highlander","P6,500,000.00","WS","Platinum","19,500,000.00"},
                                     {"4","Toyota Highlander","P6,500,000.00","RG","Platinum","26,000,000.00"},
                                     {"8","Toyota Highlander","P6,500,000.00","FE","Platinum","52,000,000.00"},
                                     {"7","Toyota Highlander","P6,500,000.00","XE","Platinum","45,500,000.00"},
                                     {"6","Toyota Highlander","P6,500,000.00","VR","Platinum","45,500,000.00"},
                                     {"1","Toyota Highlander","P6,500,000.00","SW","Platinum","6,500,000.00"},
                                     {"7","Toyota Corolla","P7,500,000.00","XD","Platinum","52,500,000.00"},
                                     {"4","Toyota Corolla","P7,500,000.00","EW","Platinum","30,000,000.00"},
                                     {"5","Toyota Corolla","P7,500,000.00","ZX","Platinum","37,500,000.00"},
                                     {"7","Toyota Corolla","P7,500,000.00","BD","Platinum","52,500,000.00"},
                                     {"7","Toyota Corolla","P6,500,000.00","VFE","Platinum","45,500,000.00"}};
        JTable maytable = new JTable(cells12,columns12);
           
             
       		
 		MainTab.addTab("Home", HomePanel); 
 		MainTab.addTab("Transaction", TransactPanel); 
 		MainTab.addTab("Gallery", GalleryPanel); 
 		MainTab.addTab("About us", AboutPanel); 
 		MainTab.setBackground(new Color(6, 0, 0)); 
 		MainTab.setForeground(Color.WHITE); 
 		MainTab.addChangeListener(new ChangeListener() { 
 		   
 	  		
 			public void stateChanged(ChangeEvent e) 
 			{ 
 				MainTab_stateChanged(e); 
 			} 
  
 		}); 
 	
 	// contentPane 
 	
 		contentPane.setLayout(null);
 		adshome.setIcon(new ImageIcon("ads.gif"));
		contentPane.setBackground(Color.black);
		addComponent(contentPane, MainTab, 0,140,1028,533); 
		addComponent(contentPane, adshome, 0,-185,1028,533);
		
	
 		
 	// HomePanel 
 		
 		HomePanel.setLayout(null); 
 		HomePanel.setBackground(Color.black); 
 		lblhomelogo.setIcon(new ImageIcon("toyota.gif"));
 	    
 	    histo.setBackground(Color.BLACK);
 	   	histo.setForeground(Color.WHITE);
 	    histo.setFont(new Font("Serif", Font.ITALIC, 14));
       	histo.setLineWrap(true);
       	histo.setWrapStyleWord(true);
 			JScrollPane areaScrollPane = new JScrollPane(histo);
 		
 		areaScrollPane.setVerticalScrollBarPolicy(
                        JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
        areaScrollPane.setPreferredSize(new Dimension(30, 50));
        
        areaScrollPane.setBorder(BorderFactory.createLineBorder(Color.WHITE,2));
        areaScrollPane.setBorder(
                      BorderFactory.createCompoundBorder(
            	                BorderFactory.createCompoundBorder(
                				BorderFactory.createTitledBorder(BorderFactory.createLineBorder(Color.BLUE), "TOYOTA COMPANY"),
        						BorderFactory.createEmptyBorder(5,5,5,5)),
                               	areaScrollPane.getBorder()));
	                                
      	areaScrollPane.setBackground(Color.BLACK);
        addComponent(HomePanel, areaScrollPane,400,2,600,380);
 		
 		addComponent(HomePanel, lblhomelogo, 10,2,898,335);
 
 	// jTabbedPane4 
 	
 		jTabbedPane4.addTab("January", JanuaryPanel); 
 		jTabbedPane4.addTab("February", FebruaryPanel); 
 		jTabbedPane4.addTab("March", MarchPanel); 
 		jTabbedPane4.addTab("April", AprilPanel); 
 		jTabbedPane4.addTab("May", MayPanel); 	
 		jTabbedPane4.addTab("June", JunePanel); 
 		jTabbedPane4.addTab("July", JulyPanel); 
 		jTabbedPane4.addTab("August", AugustPanel); 
 		jTabbedPane4.addTab("September", SeptemberPanel); 
 		jTabbedPane4.addTab("October", OctoberPanel);
 		jTabbedPane4.addTab("November", NovemberPanel);
 		jTabbedPane4.addTab("December", DecemberPanel); 
 			
 		jTabbedPane4.setBackground(new Color(5, 0, 0)); 
 		jTabbedPane4.setForeground(Color.WHITE); 
 		jTabbedPane4.addChangeListener(new ChangeListener() { 
 			public void stateChanged(ChangeEvent e) 
 			{ 
 				jTabbedPane4_stateChanged(e); 
 			} 
  
 		}); 
 			
 		
	// OrdersPanel 
 		
 		TransactPanel.setLayout(null); 
 		
 	
 		addComponent(TransactPanel, jTabbedPane4, 5,-2,633,507);
	
	
 	
 	//-- GALLERYPANEL
 	    
 	   
 		GalleryPanel.setLayout(null);
 		textArea = new JTextArea("New Arrivals", 100, 0);
 		 
       
 		lblgallerylogo.setIcon(new ImageIcon("toyota.gif"));
 		lblgallery1.setIcon(new ImageIcon("toyota_aurion.jpg"));
 		lblgallery2.setIcon(new ImageIcon("toyota_camry.jpg"));	
 		lblgallery3.setIcon(new ImageIcon("toyota_camry_2007.jpg"));	
 		lblgallery4.setIcon(new ImageIcon("toyota_corolla.jpg"));	
 		lblgallery5.setIcon(new ImageIcon("toyota_cs.jpg"));	
 		lblgallery6.setIcon(new ImageIcon("toyota_hi-ct.jpg"));	
 		lblgallery7.setIcon(new ImageIcon("toyota_iq.jpg"));
 		lblgallery8.setIcon(new ImageIcon("toyota_mustang.jpg"));
 		lblgallery9.setIcon(new ImageIcon("toyota_prius.jpg"));
 		lblgallery10.setIcon(new ImageIcon("toyota_saloon.jpg"));
 		lblgallery11.setIcon(new ImageIcon("toyota_sequoia.jpg"));
 		lblgallery12.setIcon(new ImageIcon("toyota_subaru.jpg"));
 		lblgallery13.setIcon(new ImageIcon("toyota_Supra.jpg"));
 		lblgallery14.setIcon(new ImageIcon("toyota_tf109.jpg"));
 		lblgallery15.setIcon(new ImageIcon("toyota_yaris.jpg"));
 			
 		
 		
 		addComponent(textArea, lblgallery1, 10,2,898,335);
 		addComponent(textArea, lblgallery2, 210,2,898,335);
 		addComponent(textArea, lblgallery3, 410,2,898,335);
 		addComponent(textArea, lblgallery4, 610,2,898,335);
 		addComponent(textArea, lblgallery5, 810,2,898,335);
  		addComponent(textArea, lblgallery6, 10,200,898,335);
 		addComponent(textArea, lblgallery7, 210,200,898,335);
 		addComponent(textArea, lblgallery8, 410,200,898,335);
 		addComponent(textArea, lblgallery9, 610,200,898,335);
 		addComponent(textArea, lblgallery10, 810,200,898,335);
  		addComponent(textArea, lblgallery11, 10,400,898,335);
 		addComponent(textArea, lblgallery12, 210,400,898,335);
 		addComponent(textArea, lblgallery13, 410,400,898,335);
 		addComponent(textArea, lblgallery14, 610,400,898,335);
 		addComponent(textArea, lblgallery15, 810,400,898,335);
 	    addComponent(GalleryPanel, textArea,10,50,600,280); 
 	    
 				
 			
 		JScrollPane scrollPane = new JScrollPane(textArea);
 		
 		areaScrollPane.setVerticalScrollBarPolicy(
                        JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
        scrollPane.setPreferredSize(new Dimension(100, 100));
        
        scrollPane.setBorder(BorderFactory.createLineBorder(Color.WHITE,2));
        scrollPane.setBorder(
                      BorderFactory.createCompoundBorder(
            	                BorderFactory.createCompoundBorder(
                				BorderFactory.createTitledBorder(BorderFactory.createLineBorder(Color.BLUE), "TOYOTA CARS"),
        						BorderFactory.createEmptyBorder(5,5,5,5)),
                               	scrollPane.getBorder()));
	                                
      	scrollPane.setBackground(Color.BLACK);
        addComponent(GalleryPanel, scrollPane,10,50,1000,400);
 		  textArea.setEnabled(false);			
 		
        				
 	//-- ABOUTPANEL
     
     	AboutPanel.setLayout(null);
 		farea=new JTextArea("Felmar John Alejo"+
 							   "\nBS-Information Technology");
 		
 		Marea = new JTextArea("Merz Joseph Plaza"+
 								"\nBS-Information Technology");
 								
 		txtareaAboutUs.setFont(new Font("Tahoma", Font.ITALIC, 14));
 		txtareaAboutUs.setForeground(Color.white);
 	    txtareaAboutUs.setBackground(Color.black);
 		lblfelmz.setIcon(new ImageIcon("itsme.gif"));
 		lblmerz.setIcon(new ImageIcon("merz.gif"));
 		farea.setForeground(Color.white);
 	    farea.setBackground(Color.black); 
 	    Marea.setForeground(Color.white);
 	    Marea.setBackground(Color.black); 
 	     
 	     addComponent(AboutPanel, lblfelmz, 10,10,898,400);
 	     addComponent(AboutPanel, lblmerz, 700,10,898,400);
 	     addComponent(AboutPanel, farea, 10,360,288,120);
 	     addComponent(AboutPanel, Marea, 700,360,288,120);
 		 addComponent(AboutPanel, txtareaAboutUs, 300,65,398,300);
 		 			
		//-- JUNEPANEL
 			
 		JunePanel.setLayout(null); 
 			
 		 //Create a table with a sorter.
        
         
 	  	 juntable.getColumnModel().getColumn(0).setPreferredWidth(60);    
         juntable.getColumnModel().getColumn(1).setPreferredWidth(130);    
         juntable.getColumnModel().getColumn(2).setPreferredWidth(115);   
         juntable.getColumnModel().getColumn(3).setPreferredWidth(60);    
         juntable.getColumnModel().getColumn(4).setPreferredWidth(70);
         juntable.getColumnModel().getColumn(5).setPreferredWidth(115); 
 		 juntable.setEnabled(true);
         juntable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
     
                 
                 
                 
                 
                 
 		JScrollPane junScrollPane = new JScrollPane(juntable);
        junScrollPane.setVerticalScrollBarPolicy(
                        JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
        junScrollPane.setPreferredSize(new Dimension(30, 50));
        junScrollPane.setBorder(
            BorderFactory.createCompoundBorder(
                BorderFactory.createCompoundBorder(
                                BorderFactory.createTitledBorder("June"),
                               	BorderFactory.createEmptyBorder(5,5,5,5)),
                                junScrollPane.getBorder()));
		junScrollPane.setBackground(Color.WHITE);
		junScrollPane.setForeground(Color.BLACK);    
        addComponent(JunePanel, junScrollPane,10,50,600,280);
	 

	
 	//-- JULYPANEL
 		
 		JulyPanel.setLayout(null); 
 		
 		jultable.getColumnModel().getColumn(0).setPreferredWidth(60);    
        jultable.getColumnModel().getColumn(1).setPreferredWidth(130);    
        jultable.getColumnModel().getColumn(2).setPreferredWidth(115);   
        jultable.getColumnModel().getColumn(3).setPreferredWidth(60);    
        jultable.getColumnModel().getColumn(4).setPreferredWidth(70);
        jultable.getColumnModel().getColumn(5).setPreferredWidth(115); 
 		jultable.setEnabled(false);
        jultable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
         
 		JScrollPane julScrollPane = new JScrollPane(jultable);
        julScrollPane.setVerticalScrollBarPolicy(
                        JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
        julScrollPane.setPreferredSize(new Dimension(30, 50));
        julScrollPane.setBorder(
            BorderFactory.createCompoundBorder(
                BorderFactory.createCompoundBorder(
                                BorderFactory.createTitledBorder("July"),
                               	BorderFactory.createEmptyBorder(5,5,5,5)),
                                julScrollPane.getBorder()));
		julScrollPane.setBackground(Color.WHITE);
		julScrollPane.setForeground(Color.BLACK);    
        addComponent(JulyPanel, julScrollPane,10,50,600,280);


	//-- AUGUSTPANEL
 		AugustPanel.setLayout(null); 
 			
 		augtable.getColumnModel().getColumn(0).setPreferredWidth(60);    
        augtable.getColumnModel().getColumn(1).setPreferredWidth(130);    
        augtable.getColumnModel().getColumn(2).setPreferredWidth(115);   
        augtable.getColumnModel().getColumn(3).setPreferredWidth(60);    
        augtable.getColumnModel().getColumn(4).setPreferredWidth(70);
        augtable.getColumnModel().getColumn(5).setPreferredWidth(115); 
 		augtable.setEnabled(false);
        augtable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
         
 		JScrollPane augScrollPane = new JScrollPane(augtable);
        augScrollPane.setVerticalScrollBarPolicy(
                        JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
        augScrollPane.setPreferredSize(new Dimension(30, 50));
        augScrollPane.setBorder(
            BorderFactory.createCompoundBorder(
                BorderFactory.createCompoundBorder(
                                BorderFactory.createTitledBorder("August"),
                               	BorderFactory.createEmptyBorder(5,5,5,5)),
                                augScrollPane.getBorder()));
		augScrollPane.setBackground(Color.WHITE);
		augScrollPane.setForeground(Color.BLACK);    
        addComponent(AugustPanel, augScrollPane,10,50,600,280);

	//-- SEPTEMBERPANEL
 		
 		SeptemberPanel.setLayout(null); 
 		
 		septable.getColumnModel().getColumn(0).setPreferredWidth(60);    
        septable.getColumnModel().getColumn(1).setPreferredWidth(130);    
        septable.getColumnModel().getColumn(2).setPreferredWidth(115);   
        septable.getColumnModel().getColumn(3).setPreferredWidth(60);    
        septable.getColumnModel().getColumn(4).setPreferredWidth(70);
        septable.getColumnModel().getColumn(5).setPreferredWidth(115); 
 		septable.setEnabled(false);
        septable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
         
 		JScrollPane sepScrollPane = new JScrollPane(septable);
        sepScrollPane.setVerticalScrollBarPolicy(
                        JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
        sepScrollPane.setPreferredSize(new Dimension(30, 50));
        sepScrollPane.setBorder(
            BorderFactory.createCompoundBorder(
                BorderFactory.createCompoundBorder(
                                BorderFactory.createTitledBorder("September"),
                               	BorderFactory.createEmptyBorder(5,5,5,5)),
                                sepScrollPane.getBorder()));
		sepScrollPane.setBackground(Color.WHITE);
		sepScrollPane.setForeground(Color.BLACK);    
        addComponent(SeptemberPanel, sepScrollPane,10,50,600,280);


	//-- OCTOBERPANEL
 	
 		OctoberPanel.setLayout(null); 
		
	 	 octotable.getColumnModel().getColumn(0).setPreferredWidth(60);    
         octotable.getColumnModel().getColumn(1).setPreferredWidth(130);    
         octotable.getColumnModel().getColumn(2).setPreferredWidth(115);   
         octotable.getColumnModel().getColumn(3).setPreferredWidth(60);    
         octotable.getColumnModel().getColumn(4).setPreferredWidth(70);
         octotable.getColumnModel().getColumn(5).setPreferredWidth(115); 
 		 octotable.setEnabled(false);
         octotable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
         
 		JScrollPane octoScrollPane = new JScrollPane(octotable);
 		octoScrollPane.setVerticalScrollBarPolicy(
                        JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
        octoScrollPane.setPreferredSize(new Dimension(30, 50));
        octoScrollPane.setBorder(
            BorderFactory.createCompoundBorder(
                BorderFactory.createCompoundBorder(
                                BorderFactory.createTitledBorder("October"),
                               	BorderFactory.createEmptyBorder(5,5,5,5)),
                                octoScrollPane.getBorder()));
		octoScrollPane.setBackground(Color.WHITE);
		octoScrollPane.setForeground(Color.BLACK);    
        addComponent(OctoberPanel, octoScrollPane,10,50,600,280);
 		
  			
 			
 	//NOVEMBERPANEL  		
 		NovemberPanel.setLayout(null); 
 	
         novtable.getColumnModel().getColumn(0).setPreferredWidth(60);    
         novtable.getColumnModel().getColumn(1).setPreferredWidth(130);    
         novtable.getColumnModel().getColumn(2).setPreferredWidth(115);   
         novtable.getColumnModel().getColumn(3).setPreferredWidth(60);    
         novtable.getColumnModel().getColumn(4).setPreferredWidth(70);
         novtable.getColumnModel().getColumn(5).setPreferredWidth(115); 
 		 novtable.setEnabled(false);
         novtable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
         
 	     JScrollPane novScrollPane = new JScrollPane(novtable);
 		 novScrollPane.setVerticalScrollBarPolicy(
                        JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
         novScrollPane.setPreferredSize(new Dimension(30, 50));
         novScrollPane.setBorder(
            BorderFactory.createCompoundBorder(
                BorderFactory.createCompoundBorder(
                                BorderFactory.createTitledBorder("November"),
                               	BorderFactory.createEmptyBorder(5,5,5,5)),
                                novScrollPane.getBorder()));
		novScrollPane.setBackground(Color.WHITE);
		novScrollPane.setForeground(Color.BLACK);    
        addComponent(NovemberPanel, novScrollPane,10,50,600,280);	
 			
 	 //DECEMBERPANEL	 
 		 DecemberPanel.setLayout(null); 
 	
         dectable.getColumnModel().getColumn(0).setPreferredWidth(60);    
         dectable.getColumnModel().getColumn(1).setPreferredWidth(130);    
         dectable.getColumnModel().getColumn(2).setPreferredWidth(115);   
         dectable.getColumnModel().getColumn(3).setPreferredWidth(60);    
         dectable.getColumnModel().getColumn(4).setPreferredWidth(70);
         dectable.getColumnModel().getColumn(5).setPreferredWidth(115); 
 		 dectable.setEnabled(false);
         dectable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
         
 		JScrollPane decScrollPane = new JScrollPane(dectable);
 		decScrollPane.setVerticalScrollBarPolicy(
                        JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
        decScrollPane.setPreferredSize(new Dimension(30, 50));
        decScrollPane.setBorder(
            BorderFactory.createCompoundBorder(
                BorderFactory.createCompoundBorder(
                                BorderFactory.createTitledBorder("December"),
                               	BorderFactory.createEmptyBorder(5,5,5,5)),
                                decScrollPane.getBorder()));
		decScrollPane.setBackground(Color.WHITE);
		decScrollPane.setForeground(Color.BLACK);    
        addComponent(DecemberPanel, decScrollPane,10,50,600,280);
 		
 	    //JANUARYPANEL	 
 		 JanuaryPanel.setLayout(null); 
 	
         jantable.getColumnModel().getColumn(0).setPreferredWidth(60);    
         jantable.getColumnModel().getColumn(1).setPreferredWidth(130);    
         jantable.getColumnModel().getColumn(2).setPreferredWidth(115);   
         jantable.getColumnModel().getColumn(3).setPreferredWidth(60);    
         jantable.getColumnModel().getColumn(4).setPreferredWidth(70);
         jantable.getColumnModel().getColumn(5).setPreferredWidth(115); 
 		 jantable.setEnabled(false);
         jantable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
         
 		JScrollPane janScrollPane = new JScrollPane(jantable);
 		janScrollPane.setVerticalScrollBarPolicy(
                        JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
        janScrollPane.setPreferredSize(new Dimension(30, 50));
        janScrollPane.setBorder(
            BorderFactory.createCompoundBorder(
                BorderFactory.createCompoundBorder(
                                BorderFactory.createTitledBorder("January"),
                               	BorderFactory.createEmptyBorder(5,5,5,5)),
                                janScrollPane.getBorder()));
		janScrollPane.setBackground(Color.WHITE);
		janScrollPane.setForeground(Color.BLACK);    
        addComponent(JanuaryPanel, janScrollPane,10,50,600,280);
        
         //FEBRUARYPANEL	 
 		 FebruaryPanel.setLayout(null); 
 	
         febtable.getColumnModel().getColumn(0).setPreferredWidth(60);    
         febtable.getColumnModel().getColumn(1).setPreferredWidth(130);    
         febtable.getColumnModel().getColumn(2).setPreferredWidth(115);   
         febtable.getColumnModel().getColumn(3).setPreferredWidth(60);    
         febtable.getColumnModel().getColumn(4).setPreferredWidth(70);
         febtable.getColumnModel().getColumn(5).setPreferredWidth(115); 
 		 febtable.setEnabled(false);
         febtable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
         
 		JScrollPane febScrollPane = new JScrollPane(febtable);
 		febScrollPane.setVerticalScrollBarPolicy(
                        JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
        febScrollPane.setPreferredSize(new Dimension(30, 50));
        febScrollPane.setBorder(
            BorderFactory.createCompoundBorder(
                BorderFactory.createCompoundBorder(
                                BorderFactory.createTitledBorder("February"),
                               	BorderFactory.createEmptyBorder(5,5,5,5)),
                                febScrollPane.getBorder()));
		febScrollPane.setBackground(Color.WHITE);
		febScrollPane.setForeground(Color.BLACK);    
        addComponent(FebruaryPanel, febScrollPane,10,50,600,280);
        
         //MARCHPANEL	 
 		 MarchPanel.setLayout(null); 
 	
         marchtable.getColumnModel().getColumn(0).setPreferredWidth(60);    
         marchtable.getColumnModel().getColumn(1).setPreferredWidth(130);    
         marchtable.getColumnModel().getColumn(2).setPreferredWidth(115);   
         marchtable.getColumnModel().getColumn(3).setPreferredWidth(60);    
         marchtable.getColumnModel().getColumn(4).setPreferredWidth(70);
         marchtable.getColumnModel().getColumn(5).setPreferredWidth(115); 
 		 marchtable.setEnabled(false);
         marchtable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
         
 		JScrollPane marScrollPane = new JScrollPane(marchtable);
 		marScrollPane.setVerticalScrollBarPolicy(
                        JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
        marScrollPane.setPreferredSize(new Dimension(30, 50));
        marScrollPane.setBorder(
            BorderFactory.createCompoundBorder(
                BorderFactory.createCompoundBorder(
                                BorderFactory.createTitledBorder("March"),
                               	BorderFactory.createEmptyBorder(5,5,5,5)),
                                marScrollPane.getBorder()));
		marScrollPane.setBackground(Color.WHITE);
		marScrollPane.setForeground(Color.BLACK);    
        addComponent(MarchPanel, marScrollPane,10,50,600,280);
        
         
        
         //APRILPANEL	 
 		 AprilPanel.setLayout(null); 
 	
         apriltable.getColumnModel().getColumn(0).setPreferredWidth(60);    
         apriltable.getColumnModel().getColumn(1).setPreferredWidth(130);    
         apriltable.getColumnModel().getColumn(2).setPreferredWidth(115);   
         apriltable.getColumnModel().getColumn(3).setPreferredWidth(60);    
         apriltable.getColumnModel().getColumn(4).setPreferredWidth(70);
         apriltable.getColumnModel().getColumn(5).setPreferredWidth(115); 
 		 apriltable.setEnabled(false);
         apriltable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
         
 		JScrollPane aprScrollPane = new JScrollPane(apriltable);
 		aprScrollPane.setVerticalScrollBarPolicy(
                        JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
        aprScrollPane.setPreferredSize(new Dimension(30, 50));
        aprScrollPane.setBorder(
            BorderFactory.createCompoundBorder(
                BorderFactory.createCompoundBorder(
                                BorderFactory.createTitledBorder("April"),
                               	BorderFactory.createEmptyBorder(5,5,5,5)),
                                aprScrollPane.getBorder()));
		aprScrollPane.setBackground(Color.WHITE);
		aprScrollPane.setForeground(Color.BLACK);    
        addComponent(AprilPanel, aprScrollPane,10,50,600,280);
        
        //MAYPANEL	 
 		 MayPanel.setLayout(null); 
 	
         maytable.getColumnModel().getColumn(0).setPreferredWidth(60);    
         maytable.getColumnModel().getColumn(1).setPreferredWidth(130);    
         maytable.getColumnModel().getColumn(2).setPreferredWidth(115);   
         maytable.getColumnModel().getColumn(3).setPreferredWidth(60);    
         maytable.getColumnModel().getColumn(4).setPreferredWidth(70);
         maytable.getColumnModel().getColumn(5).setPreferredWidth(115); 
 		 maytable.setEnabled(false);
         maytable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
         
 		JScrollPane mayScrollPane = new JScrollPane(maytable);
 		mayScrollPane.setVerticalScrollBarPolicy(
                        JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
        mayScrollPane.setPreferredSize(new Dimension(30, 50));
        mayScrollPane.setBorder(
            BorderFactory.createCompoundBorder(
                BorderFactory.createCompoundBorder(
                                BorderFactory.createTitledBorder("May"),
                               	BorderFactory.createEmptyBorder(5,5,5,5)),
                                mayScrollPane.getBorder()));
		mayScrollPane.setBackground(Color.WHITE);
		mayScrollPane.setForeground(Color.BLACK);    
        addComponent(MayPanel, mayScrollPane,10,50,600,280);
    	
 		// 
 		this.setTitle("Toyota Inventory System"); 
 		this.setLocation(new Point(0, 0)); 
 			this.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); 
 		
 		this.setSize(new Dimension(1015, 750)); 
 	} 
  
  		
 	/** Add Component Without a Layout Manager (Absolute Positioning) */ 
 	private void addComponent(Container container,Component c,int x,int y,int width,int height) 
 	{ 
 		c.setBounds(x,y,width,height); 
 		container.add(c); 
 	} 
  
 	// 
 	// TODO: Add any appropriate code in the following Event Handling Methods 
 	// 
 	private void MainTab_stateChanged(ChangeEvent e) 
 	{ 
 		System.out.println("\nMainTab_stateChanged(ChangeEvent e) called."); 
 		// TODO: Add any handling code here 
  
 	} 
  
 	private void jTabbedPane4_stateChanged(ChangeEvent e) 
 	{ 
 		System.out.println("\njTabbedPane4_stateChanged(ChangeEvent e) called."); 
 		// TODO: Add any handling code here 
  
 	} 
  
 	// 
 	// TODO: Add any method code to meet your needs in the following area 
 	// 
  
  
  
   /* MAIN MAIN MAIN MAIN MAIN MAIN MAIN MAIN MAIN */
  
  
 	public static void main(String[] args) 
 	{ 
 		JFrame.setDefaultLookAndFeelDecorated(false); 
 		JDialog.setDefaultLookAndFeelDecorated(true); 
 		try 
 		{ 
 			UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel"); 
 		} 
 		catch (Exception ex) 
 		{ 
 			System.out.println("toinkz...! "); 
 			System.out.println(ex); 
 		} 
 		new Toyota(); 
 	}
 //END OF MAIN
  
  
 }
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.