Is there a way to use HTML and CSS for my interface in a Java application?

I am making a game in java. Is there a way to create HTML widgets for use in the game as a user interface? It would be great if I could attach some event handlers to the controls and make full use of CSS.

+3
source share
3 answers

You can use HTML and CSS for your game, but you need a servlet to handle requests.

Event handlers can be written in JavaScript, but ultimately they will have to communicate with the server on the rear panel.

+2
source

, , Amino, CSS . .

+1

" , "

raw Java , , , HTML- .

Swing javax.swing.text.html.HTMLEditorKit , Java JEditorPane HTML + CSS ( HTMLFactory, , HTML), , , , , .

Swing-HTML , , HTML. :

http://java-sl.com/about_author.html

+1

All Articles