NBDemoGUIBuilder

Matisse GUI Builder Demo

Description

The GUI builder allows the developer to layout GUI easily and intuitively, without exposing layout managers to the user, following good UI design practices and guidelines. We call this *natural layout*. It is the job of the tool to continuosusly translate the UI desgin made by the user into a functional UI based on layout managers and Swing constructs, and produce standard Java code for it.

See the Java GUIs and Project Matisse Learning Trail for more information.

Points to Hit

  • Designing a GUI should be easy and intuitive
  • Deep knowledge of Swing should *not* be required.
  • Layout design will be greatly simplified, eliminating the current hurdle of understaning Swing layout managers.
  • Internationalization should be easy.

Demo Prep

None

Gotchas

None known

Demo:

  • Show the attendees this find dialog:

http://wiki.netbeans.info/wiki/attach/NBDemoGUIBuilder/Find_NBDemoGUIBuilder.png
and indicate that you will re-create it using Matisse.

  • Create a new Java Application project, NewGUIBuilder. Uncheck "Create Main Class".
  • Add a new JDialog Form, FindDialog
  • Create the Find Dialog


L10N / I18N

  • Show the code and the hard-coded literals
  • Create a new properties file, bundle.properties
  • Run the Internationalization Wizard
  • Show the internationalized code
  • Right-click the bundle.properties and choose Add locale.
  • Add a local, preferably for the country you're speaking in.
  • Unless you know the language, have a list of strings available to copy into your bundles file. Here a some that I've used in the past. Please add others as you create them.
  • Change your project properties Run VM Options to the following:
    -Duser.language=[[CountryCode | country code]] -Duser.region=[RegionCode]
    for example, Norway would be {-Duser.language=no -Duser.region=NO}
  • Run the project. Notice how the UI has adapted to the text size.


Demo Cleanup

These are the necessary steps to take in order to successfully run the demo again on the same machine.

  • Delete the NewGUIBuilder project.


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