title: How do I change the color of an anchorpane from the controller class?
body: <p>For a GUI I'm making the minimize, maximize, close buttons similar to that of Spotify by using an anchorpane for each 'button'. I created the buttons via scenebuilder and they are loaded to the class via fxml. I can't figure out how to call a particular instance of an anchorpane in the controller class to change its background color when the mouse enters or exits.</p>
  
  <pre><code>public static Stage primaryStage;
  
  @Override
  
  public void start(Stage primaryStage) throws Exception
  {
  
      Parent root = FXMLLoader.load(getClass().getResource("sample.fxml"));
  
      primaryStage.setScene(new Scene(root, 1280, 800));
  
      ...
  
      this.primaryStage = primaryStage;
  
      etc. 
  </code></pre>
  
  <p>is how the UI class is set up</p>
  
  <p>I expect the color of the anchorpane to change when the mouse enters the bounds, but as of now I have no idea how to call it.</p>