public static void updateJTable(String[][] bottles)
	{
		contentPane.remove(tabbedPane);
		tabbedPane = new JTabbedPane(JTabbedPane.TOP);
		tabbedPane.setBounds(10, 67, 864, 484);
		contentPane.add(tabbedPane);
		
		JScrollPane scrollPane = new JScrollPane();
		tabbedPane.addTab("My Cellar", null, scrollPane, null);

        InportAccount fileReader = new InportAccount();

        File curFile = new File(new File("wineData/Login/curLogin.txt").getAbsolutePath());

        curUser = fileReader.fileReader(curFile);

		String[] columnHeaders = {"Maker",
                "Type",
                "Year",
                "Vineyard",
                "Region",
                "Rating",
                "Comment"
                };
		table = new JTable(bottles, columnHeaders);
		table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
		ListSelectionModel lsm = table.getSelectionModel();
		lsm.addListSelectionListener(new ListSelectionListener() {
			public void valueChanged(ListSelectionEvent e) {
				ListSelectionModel lsm = (ListSelectionModel)e.getSource();
				if (lsm.isSelectionEmpty()) {
					selectedRow = -1;
				}
				else {
					selectedRow = lsm.getMinSelectionIndex();
				}
			}
		});
		table.setAutoCreateRowSorter(true);
		scrollPane.setViewportView(table);

		//Add Group tabs
		
        File curFile2 = new File(new File("wineData/Users/" + curUser[0][0] + ".txt").getAbsolutePath());
        
        try{
            
            String[] wineclubs = new String[10];
            String[] usersWineclub = new String[10];
            
            FileInputStream fstream = new FileInputStream(curFile2);

            DataInputStream in = new DataInputStream(fstream);
            BufferedReader br = new BufferedReader(new InputStreamReader(in));
            String stringLine;
            
            br.readLine();
            br.readLine();
            br.readLine();
            br.readLine();
            br.readLine();
            
            stringLine = br.readLine();
            
            wineclubs = stringLine.split(",");
            
            int i = 1;
            while(wineclubs.length > i){
                
            	scrollPane = new JScrollPane();
                tabbedPane.addTab(wineclubs[i], null, scrollPane, null);
                
                File curFile3 = new File(new File("wineData/Wineclubs/" + wineclubs[i] + ".txt").getAbsolutePath());
                
                FileInputStream fstream2 = new FileInputStream(curFile3);

                DataInputStream in2 = new DataInputStream(fstream2);
                BufferedReader br2 = new BufferedReader(new InputStreamReader(in2));
                
                br2.readLine();
                br2.readLine();
                br2.readLine();
                br2.readLine();
                
                stringLine = br2.readLine();
                
                usersWineclub = stringLine.split(",");
                
                int j = 1;
                Cellar temp = new Cellar();
                
                while(usersWineclub.length > j){
                    
                    temp.buildFromFile("wineData/Users/" + usersWineclub[j] + "Bottle.txt");                    
                    j++;                            
                }
                
                bottles = temp.toStringArray();

                table = new JTable(bottles, columnHeaders);
                table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
                lsm = table.getSelectionModel();
                lsm.addListSelectionListener(new ListSelectionListener() {
                        public void valueChanged(ListSelectionEvent e) {
                                ListSelectionModel lsm = (ListSelectionModel)e.getSource();
                                if (lsm.isSelectionEmpty()) {
                                        selectedRow = -1;
                                }
                                else {
                                        selectedRow = lsm.getMinSelectionIndex();
                                }
                        }
                });
                table.setAutoCreateRowSorter(true);
                scrollPane.setViewportView(table);
                
                
                i++;                        
            }
        }
        
        catch (Exception e){//Catch exception if any
            
            System.err.println("Error: " + e.getMessage());
        }     
	}