This might be a bit of a wide question. I have a couple of classes in Java that take input a String which is a mathematical expression and evaluates it.

I want to implement a desktop GUI for this. The user inputs the equation in a textfield and a couple of rectangles should be displayed under the textfield if the equation is not written correctly pointing at the syntax errors?

This is the closest thing I've come to what I want and it's not related to a GUI in Java http://web.cortland.edu/flteach/mm-course/glossPopupDiv.html

I use NetBeans. What can I use/How can I create a GUI for the application other than JFrame? Is there any way I could create the GUI in Javascript? Anything that can point me someplace is appreciated.

closed as off-topic by gnat, Kilian Foth, amon, Doc Brown, Eric King Nov 6 '18 at 22:11

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions asking us to find or recommend tools, libraries, programming languages, resources (including books, blogs, tutorials, and examples), or projects to undertake are off-topic here as they attract opinionated answers that won't have lasting value to others. You may be able to get help in The Whiteboard, our chat room." – Kilian Foth, amon, Doc Brown, Eric King
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 2
    JavaFX is the more modern way to develop Java desktop GUI applications. – Jesper Nov 2 '18 at 7:25

JavaFX is a good (great? I'm biased...) way to develop GUIs for Java applications. It has officially split from the core of Java as of JDK11, so maintenance should improve moving forward. It also has many improvements over the older Swing GUI classes in Java. There is a comprehensive document covering it here: https://docs.oracle.com/javase/8/javafx/get-started-tutorial/index.html

There are plenty of tutorials out there, find one that looks fun and go for it.

There is also a GUI builder for JavaFX, SceneBuilder. It is now maintained by Gluon, and I find it works very well for simple GUIs.

I would recommend using at least Java 8 update 40, there were some significant improvements like stock dialogs added then.

Not the answer you're looking for? Browse other questions tagged or ask your own question.