had to fix this code for school, everyone now fixed every error they previously had and now everyone has the same errors and nobody can figure out why
the code:
import javafx.scene.Scene; import javafx.stage.Stage; import javafx.scene.layout.*; import javafx.scene.control.*; import javafx.scene.text.*; public class Opdracht1WEEE extends Application { GridPane mijnGrid; Scene scene; Text scenetitle; public void start(Stage primaryStage) { primaryStage.setScene(scene); Scene scenE = new Scene(mijnGrid, 400, 250); primaryStage.setTitle(titelTekst); primaryStage.show(); String titelTekst = "WEEE - Periode 1, Les 1"; Text scenetitel = new Text(titelTekst); scenetitel.setFont(Font.font("Calibri", FontWeight.NORMAL, 30)); mijnGrid.add(scenetitle, 0, 0, 2, 1); Label vraag0 = new Label("Gefeliciteerd! Het werkt!"); vraag0.setFont(Font.font("Arial", FontPosture.ITALIC, 20)); mijnGrid.add(vraagO, 0, 1); mijnGrid = new GridPane(); for (char karakter : vraag0.getText(ToCharArray())) { System.out.println(karakter); } System.out.println(vraag0.getText).replace(('!'),(' ') + ("nog niet helemaal")); Label vraag1 = new Label("Hoe vond je de opdracht?"); TextField antwoord1 = new TextField(); mijnGrid.add(vraag1, 0, 2); mijnGrid.add(antwoord1, 1, 2); Label vraag2 = new Label("Wat vond je lastig?"); mijnGrid.add(vraag2, 0, 3); if (vraag.getText())toCharArray [0] = 'W'; { CheckBox antwoord2A = new CheckBox("Spelling"); CheckBox antwoord2B = new CheckBox("Interpunctie"); CheckBox antwoord2C = new CheckBox("Volgorde"); CheckBox antwoord2D = new CheckBox("Structuur & Layout"); mijnGrid.add(antwoordA, 1, 3); mijnGrid.add(antwoord2B, 1, 4); mijnGrid.add(antwoorb2D, 1, 6); mijnGrid.add(antwoord2C, 1, 5); } } public static void main(String[] args) { int getalNummerA = -1; if (args.length > 0) { tekstEen = args[0].toString(); } String tekstEen = ""; System.out.println(getalnummerA); System.out.println("Hallo" + tekstEen); if (magVerder && (getalNummerA == 0 || textEen.isEmpty())) { getalNumerA = Math.round( (20.0f * (float)Math.random() )); if (getalNummerA > 0) { launch(Args); boolean magverder = true; } } } }
the errors when compiling:
D:\School\TPR CODE JAVA\CODE>javac Opdracht1WEEE.java Opdracht1WEEE.java:13: error: cannot find symbol public class Opdracht1WEEE extends Application ^ symbol: class Application Opdracht1WEEE.java:31: error: cannot find symbol primaryStage.setTitle(titelTekst); ^ symbol: variable titelTekst location: class Opdracht1WEEE Opdracht1WEEE.java:44: error: cannot find symbol mijnGrid.add(vraagO, 0, 1); mijnGrid = new GridPane(); ^ symbol: variable vraagO location: class Opdracht1WEEE Opdracht1WEEE.java:46: error: cannot find symbol for (char karakter : vraag0.getText(ToCharArray())) { ^ symbol: method ToCharArray() location: class Opdracht1WEEE Opdracht1WEEE.java:50: error: cannot find symbol System.out.println(vraag0.getText).replace(('!'),(' ') + ("nog niet helemaal")); ^ symbol: variable getText location: variable vraag0 of type Label Opdracht1WEEE.java:63: error: cannot find symbol if (vraag.getText())toCharArray [0] = 'W'; ^ symbol: variable vraag location: class Opdracht1WEEE Opdracht1WEEE.java:63: error: cannot find symbol if (vraag.getText())toCharArray [0] = 'W'; ^ symbol: variable toCharArray location: class Opdracht1WEEE Opdracht1WEEE.java:68: error: cannot find symbol mijnGrid.add(antwoordA, 1, 3); ^ symbol: variable antwoordA location: class Opdracht1WEEE Opdracht1WEEE.java:70: error: cannot find symbol mijnGrid.add(antwoorb2D, 1, 6); ^ symbol: variable antwoorb2D location: class Opdracht1WEEE Opdracht1WEEE.java:87: error: cannot find symbol tekstEen = args[0].toString(); ^ symbol: variable tekstEen location: class Opdracht1WEEE Opdracht1WEEE.java:93: error: cannot find symbol System.out.println(getalnummerA); ^ symbol: variable getalnummerA location: class Opdracht1WEEE Opdracht1WEEE.java:98: error: cannot find symbol if (magVerder && (getalNummerA == 0 || textEen.isEmpty())) ^ symbol: variable magVerder location: class Opdracht1WEEE Opdracht1WEEE.java:98: error: cannot find symbol if (magVerder && (getalNummerA == 0 || textEen.isEmpty())) ^ symbol: variable textEen location: class Opdracht1WEEE Opdracht1WEEE.java:100: error: cannot find symbol getalNumerA = Math.round( (20.0f * (float)Math.random() )); ^ symbol: variable getalNumerA location: class Opdracht1WEEE Opdracht1WEEE.java:102: error: cannot find symbol if (getalNummerA > 0) { launch(Args); ^ symbol: variable Args location: class Opdracht1WEEE 15 errors
hope some of you know what is going on.