griffon create-app mocha -fileType=java
Why pick mocha as the name? because it's a delicious (and groovier) Java brew

griffon-app/models/mocha/MochaModel.java griffon-app/views/mocha/MochaView.java griffon-app/controllers/mocha/MochaController.java
Good. Let's continue this exercise by modifying the Model and Controllers first. We'll make sure that the Model contains at least one observable property, while the controller will have a single action that pops up a MessageDialog upon activation. The contents of the dialog will be whatever value is currently assigned to the model's observable property. Edit the Model file. You'll see that the template already suggests you the code needed to setup an observable property named input. Removing the comments leaves us with the following code
The AbstractGriffonModel supplies the basic behavior for a GriffonModel implementation. Next is the Controller. Its template also suggests how an action can be implemented.
Three things to note here. First, the Controller requires a reference to its Model, that's why a setter of the appropiate type must be added to the class. Second, the action itself is implemented as a method given that Java knows nothing of Groovy's closures. By the way, this trick also works on Groovy based controllers. Finally, this class also extends from an abstract one that delivers default behavior, for example the getApp() method used to get a hold of the current application instance. And now for the piece de ressistance: writing a Java based View. Fortunately for us the template does most of the work once more. A Java based View must have a reference to its Model and Controller. It should also initialize the UI inside the Event Dispatch Thread. Lastly, it should connect UI elements with the model by means of traditional event listeners or a binding library. For this example we'll assume that the View is just a mediator between the application and a standard Java view built by conventional means.
We can appreciate that the View does ensure that the UI is initialized inside the Event Dispatch Thread, as the init() method is called within the boundaries of a call to execSync(). Exactly, the same method you have access in Groovy artifacts. The init() method creates an instance of MochaPanel and associates some of its components with the model, in other words, performs old-school binding on them. There's one last source file we nee to look at, the MochaPanel. For this example I've chosen to duplicate Example #4 from the DesignGridLayout examples, slightly modified to include a JTextField and a reference to the "OK" button:
This class stands for your run-of-the-mill Java View. We're almost ready to launch this puppy, we're only missing the DesignGridLayout library in our classpath. That can be solved easily by just installing a plugin
griffon install-plugin designgridlayout
You should see a similar screen when you run the application and enter some text in the text field

Once you click on the "OK" button you're greeted with a dialog

And that's all that there's too it. By the way, your choice of fileType will be saved in griffon-app/conf/BuildConfig.groovy so that further artifacts can be created with the same type without the need to specify the same flag over and over again. You can of course, change this behavior by editing the file or setting the flag once more. Assuming you'd like to create a Groovy service for this application you'd only need to type
griffon create-service accounts -fileType=groovy
More Griffon 0.9.1 feature discussions to come later
Keep on Groovying!
NOTE: on Windows platforms you're required to surround -fileType=java with quotes. This is a know issue (GRIFFON-265) whose fix will be available in the next release.