Write NetBeans modules with nice, slick UI, but avoid dependency on Swing or JavaFX! This wiki page is dedicated to NetBeans efforts to bring Java and HTML closer together and use it as a rendering toolkit inside of NetBeans and other environments capable of rendering HTML. Getting your hands dirty with the code:

$ git clone
$ cd incubator-netbeans-html4j/
$ mvn clean install -DskipTests
$ mvn test

Read about use-cases in our javadoc. Report bugs at bugzilla.

Develop your own applications with Html4Java API by following the tutorial.



Inception Review

Notes from review to include Html4Java in NetBeans 8.1.

  • Done: TCR packaging, why SPI packages are in org.apidesign.html? Rename to org.netbeans.html
  • Done: use hg external binaries for 1.0
  • usecases in NetBeans:
    • Done: show top component - via @OpenHTMLRegistration annotation
    • Done: show (modal) dialog - see sample.
    • Done embed in custom & other UI
  • Done: own cluster? wouldn't be able to use from platform. Rejected.
  • Done: geo & sound. They are in separate modules - good.
  • Done: wizard for component/dialog
  • Done: license
    • OK: asm
    • Fixed: knockout.js
  • OK: ko4j name is OK
  • Done: TCR nbrwsr rename to org.netbeans.api.html4j

Approved for development.

Final Review

  • Done: HTMLDialog without any buttons should show JOptionPane.DEFAULT_OPTION - e.g. OK, cancel.
  • Done: Add sample into Javadoc
  • Done: HTMLComponent.type should be JComponent and Node

Approved for integration.


There is a generic part of the HTML/Java API that is lightweight and can be used in any IDE, application and environment:


There is an experimental (to be replaced by official API like HtmlUIForTemplates) NetBeans specific binding and sample application that is suitable for usage in the NetBeans Platform 8.0.x applications:

Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo