title: How can I implement this Array.sort method into my actionPerformed?
body: <p>I have this Array.sort method in one class to list my objects from highest to lowest: </p>
  
  <pre><code>public static void sortFilm(Film[] array) {
      Arrays.sort(array, new Comparator&lt;Film&gt;() {
          @Override
          public int compare(Film f1, Film f2) {
              return Double.compare(f1.getFinalScore(), f2.getFinalScore());
          }
      });
      printArr(array);
  }
  </code></pre>
  
  <p>I intend to use it inside an actionPerformed for my listener class but I don't know how to create the necessary parameter (Film[]) to make use of the Array.sort method. My intention is to show a list of all objects from highest to lowest once the specific button is pressed.</p>
  
  <p>Thanks in advance!</p>
  
  <p>edit:</p>
  
  <p>This is how I think it will sort of look like:</p>
  
  <pre><code>@Override
  public void actionPerformed(ActionEvent e) {
      this.cm.sortFilm(?);
  }
  </code></pre>
  
  <p>Question mark is the missing parameter.</p>