I wanted to jump directly to the game development API after I introduced the low-level graphic interface canvas of j2-based architecture. However, for content integrity, I decided to briefly introduce the advanced graphic user interface. However, the key points are different. I won't explain how to use various classes in detail. I just want to show you the running effects of netbeans's visual development functions and advanced graphic user interfaces on mobile phones. Let the pictures speak.
1. When creating a MIDlet in the project, select visual MIDlet, for example:
2. A visual design interface is displayed, such:
In the above interface, the "stream designer" is first presented to us. In the stream designer, we can set how to navigate various screens of the mobile phone program, you can see the effect later. Look at the "component panel" on the right, which is divided into "screen", "command", "form item", "element", and so on, the components in the "screen" category can occupy the entire screen as forms of Mobile Phone programs. The most commonly used component is "form. Of course, the components in "Form Items" can only be placed in "form.
3. Drag "form" to "stream designer". Here, we drag three to demonstrate the need, for example:
4. Double-click "form1" in the stream designer to go to the "screen design interface". Here, we drag a choicegroup component to the screen and then drag several choiceelements to choicegroup, these components can be found in the component panel on the right. For example:
5. We can also drag the "command" component to the screen, such:
6. You can edit the command action. For example, we set it to jump to "form2", for example:
7. switch back to the "stream designer". You can see that "form1" is associated with "form2", for example:
8. In the same way, we can add a table control in "form2" and add a "command" to switch it to "form3", for example:
9. Edit "form3" in the same way, add a "Gauge" control, add a "command", and exit the program. For example:
10. switch back to the "stream designer" and drag the start point of the mobile device to the left of "form1" to get a complete program flow chart, as follows:
11. The following figure shows the running effect: