Graphics With Java in Replit
I teach a high school computer programming class and we use Java. Is it possible to write graphical programs that run in the browser using Java in Replit?
In the past I have used Processing.org which makes it easy for beginners to visualize what they are learning with the code. We could do fun animations and simple games by drawing shapes and images on the screen, controling them with the keyboard, etc.
I know this is possible with other languages but I would like to stick with Java this year so I don't confuse them.
Voters
KyleTower1
You may use the StdDraw.java library by following this tutorial: https://www.youtube.com/watch?v=afv3lAJgsag
RYANTADIPARTHI
it is possible, but it's rare. You can use it with frontend. like HTML, css, and java.
as prementioned im suire [Java Swing] (https://docs.oracle.com/javase/8/docs/technotes/guides/swing/index.html) would be a good option, if you go onto the new repl tab and pick a language, java swing should come up.
@k9chelsea2 I think this will work! I'm trying to get it working but getting a weird bash error.
https://repl.it/@JasonSidell/JavaSwingPractice#Main.java
EDIT: Here's the solution to the bash error
https://repl.it/talk/ask/Java-Swing-BASH-Error-xset-command-not-found/117546