Tutorial One: Part Three

Adding a Set Format panel

In this final section we will add the option of setting the time format.

Adding a panel and setting the layout:
Add some components:
Setting the properties:
Adding functionality:
Compiling and executing:

You can now set the time format using the SimpleDateFormat syntax (described in the JDK documentation - $JDK_HOME/docs/api/java/text/SimpleDateFormat.html, where $JDK_HOME is the directory where the JDK installed)

For example, try the entering following in your New Format text panel:EEEE, d MMMM, hh:mm:ss a .


This concludes Tutorial One. On the Running Workspace, right-click on the ClockFrame item appearing in the Execution Window, and select Terminate Process. This will close the currently running ClockFrame.

In Tutorial Two: Part Two, we will use Forte for Java's beans support to build a JavaBeans component, and then we will build a form using that bean to set the background color using RGB sliders.

Beginning Prev Next