code: private static void setTimeOneWithTimeTwoButtonClicked(ActionEvent e) {
          LocalTime timePicker2Time = timePicker2.getTime();
          timePicker1.setTime(timePicker2Time);
          // Display message.
          String message = "The timePicker1 value was set using the timePicker2 value!\n\n";
          String timeString = timePicker1.getTimeStringOrSuppliedString("(null)");
          String messageAddition = ("The timePicker1 value is currently set to: " + timeString + ".");
          panel.messageTextArea.setText(message + messageAddition);
      }
docs: setTimeOneWithTimeTwoButtonClicked, This sets the time in time picker one, to whatever time
  is currently set in time picker two.