public void updateUI(String tableName)
    {
    	
    	if (model != null)
    	{
    		table.setName(tableName);
    		System.out.println("------- TablePanel UpDate Initiated ---------");
    		
    		/* get the data from the database and load it into the table model */
    		/* when data is loaded into the data model, it's instantly visible in the table */
    		model.setDataVector(database.getDisplaySet(tableName,orderby,order), database.getColumnNames());
    		
    		/* Effectively, hide the columns "FileName", "Duration" by removing them from the table but not the model */
    		table.removeColumn(table.getColumnModel().getColumn(table.getColumnModel().getColumnIndex("FileName")));
    		table.removeColumn(table.getColumnModel().getColumn(table.getColumnModel().getColumnIndex("Duration")));
    		
    		/* set the desired column sizes */
    		table.getColumnModel().getColumn(table.getColumnModel().getColumnIndex("Year")).setMaxWidth(45);
    		table.getColumnModel().getColumn(table.getColumnModel().getColumnIndex("Time")).setMaxWidth(40);
    		table.getColumnModel().getColumn(table.getColumnModel().getColumnIndex("Genre")).setMaxWidth(60);
    		
    	}
    	maxIndex = table.getRowCount();
    	int tmp = -1;
    	
    	/* inserts, deletes and sort can change where the current song is in list */
    	/* if media player is not null && if media player has a song opened, then find it in table */
    	if(mplayer!=null && mplayer.getCurrentSong() != null)
    	{
    		tmp = getIndexOf(mplayer.getCurrentSong());
    	    if(tmp != -1)currentIndex = tmp;	
    	}	
    	/*[ tmp != -1 ] indicates that song was found in list, set the currentIndex */
   
    	System.out.println(this.getClass().toString()+":: updateUI("+tableName+"):: currentIndex = " + currentIndex + ", maxIndex = "+ maxIndex);
    	/* highlight the currentIndex */
    	//if(!(maxIndex==0))table.setRowSelectionInterval(currentIndex, currentIndex);
    	
    	for(int i = 6; i >1; i--)
    	{
    		if(!columnState[i-1])table.removeColumn(table.getColumn(table.getColumnName(i)));
    	}
    	if(!importing)buildShuffleList();
    	importing = false;
    }