title: How can I use HTML & CSS to create the user interface for my java app?
body: <p>I have just read this article: <a href="http://docs.oracle.com/javafx/2/webview/jfxpub-webview.htm" rel="noreferrer">http://docs.oracle.com/javafx/2/webview/jfxpub-webview.htm</a>  It shows how to build a java app using the javafx library and also how to use some classes such as WebEngine and WebView to display a web page in the app, basically turning it into a browser.</p>
  
  <p>Here is some relevant info from the article:</p>
  
  <blockquote>
    <p>The embedded browser component is based on WebKit, an open source web
    browser engine. It supports Cascading Style Sheets (CSS), JavaScript,
    Document Object Model (DOM), and HTML5.</p>
    
    <p>The embedded browser enables you to perform the following tasks in
    your JavaFX applications:</p>
    
    <ol>
    <li>Render HTML content from local and remote URLs</li>
    <li>Obtain Web history</li>
    <li>Execute JavaScript commands</li>
    <li>Perform upcalls from JavaScript to JavaFX</li>
    <li>Manage web pop-up windows</li>
    <li>Apply effects to the embedded browser</li>
    </ol>
  </blockquote>
  
  <p>I would basically like to entirely dispense with Java or JavaFX GUI tools, except for those required to display HTML and CSS, as described in the article, and build the entire user interface for my app in HTML and CSS.  I would like various HTML buttons to cause events to transpire in my java code.</p>
  
  <p>Does this seem like a good idea?  And since it does seem like a good idea to me, I'm also wondering why would anyone ever use any other method to build a GUI in java.</p>