public void loadAllTasks(){
        allTasks = null;
        try {
            ResultSet dbAllTasks = null;
            Statement statement;
            statement = connection.createStatement();
            dbAllTasks = statement.executeQuery( "SELECT Task.* FROM Task;");                     

            while(dbAllTasks.next())
            {
                for(int i=0; i<allAssets.size();i++){
                    if(allAssets.get(i).getAssetID()==dbAllTasks.getInt("assetID")){
                        Task task = new Task(dbAllTasks.getInt("Task.taskID"), UserLoggedIn, dbAllTasks.getString("Task.TaskName"), dbAllTasks.getInt("Task.taskPriority"),
                                dbAllTasks.getString("Task.taskStatus"), dbAllTasks.getInt("Task.projectID"), allAssets.get(i), dbAllTasks.getString("Task.type"));
                        allTasks.addTask(task);
                    }
                }
            }
            
        } catch (SQLException ex) {
            Logger.getLogger(testFrame3Tim.class.getName()).log(Level.SEVERE, null, ex);
        }
    }