Ask coding questions

← Back to all posts
Is there anyway to run this program on repl?
Chill16 (1)

I am trying to practice with exercises out of a java textbook but when I reached the GUI section I couldn't get repl to run any of the programs without getting a barrage of errors. Is there any way to run these programs?

Problem: http://math.hws.edu/javanotes/c3/ex8-ans.html

Comments
hotnewtop
OldWizard209 (1537)

this is because you haven't got these packages installed:

import javafx.application.Application;
import javafx.scene.layout.BorderPane;
import javafx.scene.Scene;
import javafx.stage.Stage;
import javafx.scene.canvas.Canvas;
import javafx.scene.canvas.GraphicsContext;
import javafx.scene.paint.Color;

Install these packages and then it should run properly.
Here is a guide to install javafx:
https://docs.oracle.com/javafx/2/installation/jfxpub-installation.htm