I have this code:

```
List<Node> legends = new ArrayList<>(lineChart.lookupAll("Label.chart-legend-item"));
Legend legend1 = (Legend)legends.get(0);

```

The problem is that my IDE can't find any `Legend` class to import it.

I'm talking about this class: <https://docs.oracle.com/javafx/2/api/javafx/scene/doc-files/cssref.html#legend>

I'm using Java 10. Why my IDE don't find `Legend` class?

What I want to achieve is to take the name of legend.