0
<?xml version="1.0" encoding="UTF-8"?>

<?import javafx.scene.control.Button?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.Slider?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.media.MediaView?>

<AnchorPane prefHeight="500.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8.0.121" xmlns:fx="http://javafx.com/fxml/1" fx:controller="MediaController">
    <children>
        <MediaView fx:id="mediaView" fitHeight="450.0" fitWidth="800.0" onMouseClicked="#mediaViewClicked" />
        <Button fx:id="playButton" layoutX="26.0" layoutY="459.0" minHeight="40" minWidth="60" mnemonicParsing="false" onAction="#play" text="Play" />
        <Slider fx:id="timeSlider" layoutX="169.0" layoutY="463.0" majorTickUnit="100.0" minorTickCount="2" onMousePressed="#timeSliderClicked" onMouseReleased="#timeSliderReleased" prefHeight="17.0" prefWidth="577.0" />
        <Button fx:id="pauseButton" layoutX="99.0" layoutY="459.0" minHeight="40" minWidth="60" mnemonicParsing="false" onAction="#pause" text="Pause" />
        <Slider fx:id="volumeSlider" layoutX="761.0" layoutY="458.0" orientation="VERTICAL" prefHeight="40.0" prefWidth="14.0" />
        <Label fx:id="timeLabel" layoutX="416.0" layoutY="478.0" text="0.0/100.0" />
    </children>
</AnchorPane>

I have this fxml file from one of my old projects but the MediaView is highlighted in red and I cannot import it. Does anyone know how I can use it?

I tried setting the SDK to 1.8 but that doesn't work. I've tried downloading JDK 8 but I have no idea what I'm doing here and it says that I cant use anything under 11 anymore.

Aliator
  • 7
  • 3

0 Answers0