private void update() {
    details.addUpdate(newUpdate.getText());
    newUpdate.setText("");
    Data.setTaskDetails(task.getId(), details);

    workLog.setText(details.getWorkLog());
    workLog.setCaretPosition(details.getWorkLog().length());
  }
 public WorkDialog(AssignedTask task) {
   super();
   this.task = task;
   setTitle(task.toString());
   details = Data.getTaskDetails(task.getId());
   createComponents();
   layoutComponents();
   setActionListeners();
   setDefaultCloseOperation(DISPOSE_ON_CLOSE);
 }