#Terminal and Desktop library Java
1 messages · Page 1 of 1 (latest)
<@&987246487241105418> please have a look, thanks.
Here is an AI assisted attempt to answer your question 🤖. Maybe it helps! In any case, a human is on the way 👍. To continue talking to the AI, you can use </chatgpt:1108714622413963314>.
-
For a Terminal UI in Java, there are libraries like Lanterna and Charva that can be used to create text-based user interfaces similar to bubble tea in Go or ink in JS. These libraries allow for creating interactive console applications with features like colors, cursor movement, and keyboard input handling.
-
As for building desktop applications using HTML/CSS/JS in Java, you can use JavaFX or Swing libraries. Both JavaFX and Swing provide APIs for creating graphical user interfaces (GUIs) in Java. JavaFX is the newer and more modern option, with support for web technologies like HTML, CSS, and JavaScript through the WebView component. This allows you to embed web content within your desktop application.
In summary, there are options available for creating a Terminal UI in Java using libraries like Lanterna and Charva. Additionally, you can build desktop applications with HTML/CSS/JS components using JavaFX or Swing libraries.
- jshell
- majority of java desktop apps are written with javafx, which supports some sort of html/css stuff
otherwise u can also create an actual website with java using thymeleaf or vaadin and then display that using electron/cef or similar
id recommend going the most popular approach though, i. e. javafx. will be easier overall
or to not use java for web and instead write it with actual frontend tech
like html/typescript/css/react/angular/vue and whatnot
JavaFX has javafx.scene.web.WebView if you need to open "sites" inside a JavaFX app.
But as @cosmic wave said, it makes more sense to go direct to JavaFX Desktop App, or some frontend tech.
Why need to open the entire app on WebView/etc ?
If you really need a Desktop App (and not just open it on browser) I think you should use a better tool (like JavaFX)
If you don't need, just open it on browser, you can make it an PWA as well.
If the Desktop App is just for Windows, you can check .NET as well.
Thanks for suggesting I will try javafx
I doubt thats what they mean if talking about terminal ui
like bubble tea (go) is a framework to build simple and complex terminal applications
jshell is a REPL tool on the other hand