I am hesitant to show large areas of my code here due to the fact it is for class work, however if you need to see something then I will be happy to add it to the post.
The object of my code is to calculate a convex hull and display it. My first class calculates the lines and stores them in a Line[]. I then call a javaFX class by writing Application.launch(DrawConvexHull.class, args);
in my main(). However I need to pass the Line[] lines into the DrawConvexHull class start(). Yet when I do this by adding a parameter to it, it throws an error that I am not overriding the start(). This is my DrawConvex
import javafx.application.Application;
import javafx.scene.Group;
import javafx.scene.Scene;
import javafx.scene.layout.VBox;
import javafx.stage.Stage;
import javafx.scene.shape.Line;
class DrawConvexHull extends Application{
@Override
public void start(Stage primaryStage) throws Exception{
VBox box = new VBox();
final Scene scene = new Scene(box,300, 250);
scene.setFill(null);
for (Line each : lines ) {
if (each != null) {
box.getChildren().add(each);
}
}
primaryStage.setScene(scene);
primaryStage.show();
}
public static void main(String[] args) {
launch(args);
}
}