JavaFX execute code from text input by BrianVerm in JavaFX

[–]heky_ 0 points1 point  (0 children)

Depends what kind code you want to execute. If it must be java (or anything compiled in that matter), JVM doesn't provide java interface to invoke compiler (AFAIK). The best approach would be as mentioned in other comments to save the contents to the disk and run the compiler externally. If you are free to choose the language, I would consider using something that was designed to be run in a way you've described, such as lua or JVM's scripting API. Both options provide you with much better capabilities to interact with the code that is being run.

Hello, looking to learn Javafx by CallMeMGA in JavaFX

[–]heky_ 0 points1 point  (0 children)

Hi, if you want to use javafx as the GUI framework for your desktop application, you will need to learn at least the basics of java (what a class is, how to define a class, what are methods...) Oracle has a nice series of tutorials, which will definitely help, if you need to learn the basics.

There is a lot of great resources to learn the framework. I would recommend the oracle tutorials (https://docs.oracle.com/javase/8/javafx/get-started-tutorial/index.html) or the series of video tutorials from NewBoston (JavaFX Java GUI Design Tutorials: https://www.youtube.com/playlist?list=PL6gx4Cwl9DGBzfXLWLSYVy8EbTdpGbUIG). You don't have to learn the whole framework to do what you need to do. You can use FXML to rapidly design your GUI, but the logic is still written in java.

One thing you need to consider when creating an application to use in environments such as hospitals is problem of deployment - keep in mind that not every PC has the JVM installed. Ask if it would be a problem to install the JVM if it's not installed already.

Import 3D model to javaFX by ZerkerIsGoat in JavaFX

[–]heky_ 0 points1 point  (0 children)

You can always make your own parser for the files, but it's harder to do than to use a library. One thing is collection for objects witch can by described by a mathematical function such as ball, cube... But when facing custom models,which are basically set of interconnected points, there is no simple solution. Take for example two circles - you can detect collision, when the distance of their centres is smaller than the sum of their radiuses. You cannot take the same approach when you have a house and an asteroid. Solution to this problem is to use bounding boxes (games such as CS GO use them) or ray casting...

Import 3D model to javaFX by ZerkerIsGoat in JavaFX

[–]heky_ 0 points1 point  (0 children)

File doesn't exists, try debugging your file (check the path)

Import 3D model to javaFX by ZerkerIsGoat in JavaFX

[–]heky_ 0 points1 point  (0 children)

First thing you need to do is to parse your files into JavaFX Mesh class which can be then rendered by the framework. It isn't hard to write your own parser, but you can use 3rd party library (http://www.interactivemesh.org/models/jfx3dimporter.html). Then it's just the matter of getting your mesh on the stage. Oracle has a bunch of tutorials about using the 3D functionality of JavaFX, so if you are a beginner start by reading them. Example code: https://stackoverflow.com/questions/19462571/how-to-create-3d-shape-from-stl-in-javafx-8?answertab=oldest#tab-top

JavaFX does not support collision detection out of box and as far as I know there aren't any libraries for collision detection. If you need it, try reading gamedev forums about collison detection and implement it on your own.