2

Possible Duplicate:
How to use HTML and CSS as a Java application GUI?

I'm trying to found another way to create GUIs for Java programs without Swing. I want something more dynamic and easy to use than Swing.

There is anything that I can use for this?

In truth, I want something similar to HTML. Exists?

Community
  • 1
  • 1
Renato Dinhani
  • 35,057
  • 55
  • 139
  • 199
  • 1
    What do you mean by "more dynamic"? Easier to change? – Dave Newton Mar 09 '12 at 01:34
  • @DaveNewton Sorry, my question was incomplete. I'm searching for something similar as HTML, CSS and Javascript usage. Something where I can define areas, add and remove contents, fields in a easy way. – Renato Dinhani Mar 09 '12 at 01:37
  • 1
    *"I want something similar to HTML."* How does HTML offer key-bindings, or adding accelerators for form controls or (..etc.)? While HTML/CSS and Swing have some commonalities, and in some cases HTML/CSS offers some layout abilities not immediately available in Swing (e.g. the CSS style `float` positioning system), the two are different technologies for different circumstances. I think that by the time you reduce Swing to what HTML can achieve, it would be a pretty 'poor' substitute for a 'rich' client desktop app. – Andrew Thompson Mar 09 '12 at 02:18
  • If you would have asked for something more dynamic than HTML, I might have suggested Swing. :) – user unknown Mar 09 '12 at 03:16

1 Answers1

1

JavaFX 2.0 might be what you are looking for (ignore JavaFX 1.0 which is very outdated):

  • It has an HTML-style layout language called FXML.
  • It also allows skinning of user interfaces with CSS-style themes.
  • It also has a WebView component that allows you to embed any web / HTML content in your app.

Having said that, I don't think Swing is hard to use when you get used to it, particularly if you use an improved layout manager like MigLayout.

mikera
  • 105,238
  • 25
  • 256
  • 415
  • You might also check how to create HTML/CSS/JavaScript based GUI in Java Desktop application: http://java.dzone.com/articles/htmlcssjavascript-gui-java-0 – Vladimir Mar 04 '15 at 17:15