@Override
	public JTable select(String selectedTrain) {
	    selection = new String[result.length][result.length];
	   
	    int n = 0;
		for(int i = 0; i < result.length; i++){
				if(result[i][0].equals(selectedTrain)){
					selection[n] = result[i];
					n++;
				}
		}
		
		System.out.println(n);
		String[][] small_selection = new String[n][8];
		for(int i = 0; i < small_selection.length; i++){
	    	for(int k = 0; k< small_selection[i].length; k++){
	    		small_selection[i][k] = selection[i][k];
	    		System.out.println(small_selection[i][k]);
	    	}
		}
		
		Object rowSchedule[][] = small_selection;
	    Object columnTitle[] = result[0];
	    JTable table = new JTable(rowSchedule, columnTitle);
	    
	    return table;
	}