![]() The dialog box asks you for the window position. If the View module isn't already open, right-click it and select New -> Window. But instead of creating a JFrame form, as you do in the Swing application, you’ll create its RCP equivalent, a TopComponent. The new module contains a package called todo.view. Right-click the View module and select Open Project (see Figure 5). NetBeans IDE's RCP functionality combines all layer.xml files during runtime and creates the central registry of the application. The XML layer is a file named layer.xml, and each module can have one. To create the XML layer, right-click the module and select New -> Other -> Module Development -> XML Layer. In NetBeans IDE 7.4, the Generate XML Layer checkbox has been removed from the second step of the wizard. Type todo.view in the Code Name Base field and then click Finish (see Figure 4). Type View as the module name and click Next. Right-click the Modules folder icon and choose Add New. NetBeans creates the TodoRCP project containing an empty Modules folder and an Important Files folder, which act as a container for the modules that will be created in the rest of this article. Enter TodoRCP as the project name and choose a suitable project location (anywhere on your hard disk), as shown in Figure 3. To get started, click the New Project toolbar button and select NetBeans Platform Application in the NetBeans Modules category (see Figure 2). Figure 1 shows a rough sketch of both.įigure 1 Step 1: Build a Static Prototype of the GUI You will have two main windows for the to-do application: a task list window and a task editing form. Tasks can be marked as completed, but this doesn't mean they have to be deleted or hidden.Tasks that are either late or near their deadlines should have visual cues.Tasks should have a due date, so users can focus on tasks that are closer to their deadline.Tasks should have a priority, so users can focus first on higher-priority tasks.Your application requirements include the following: These steps form a process that starts with the View, then builds the Controller, and finally builds the Model (the familiar MVC architecture). Code the persistence logic by modeling the classes and the database.Build a "dynamic" prototype of the application, coding user interface events and associated business logic and creating customized GUI components as needed.Build a "static" visual prototype of the GUI, using the NetBeans IDE's visual GUI builder to build a task list window.You'll develop the to-do application in three steps: It won't just demo the NetBeans IDE's RCP features it also sticks to object-oriented best practices, showing that you can develop GUI applications quickly and interactively without compromising long-term maintenance and a sound architecture. The example application builds a to-do list, which is commonly found as part of privileged identity management (PIM) suites. ![]() Then you can compare the two applications by switching between the two project groups by right-clicking and selecting Project Group and the appropriate group. Later, we'll create another group for the new RCP to-do application. ![]() Give the project group a name and click Create Group. To compare the applications, open the original application in NetBeans IDE and create a new project group by right-clicking somewhere inside the Project tab and selecting Project Group -> New Group. You can download and then unzip the original application to compare it with the RCP to-do application that you'll develop in this article. ![]() Note: NetBeans IDE 7.4 requires JDK 7, while earlier versions up through NetBeans IDE 7.3 can run with JDK 6. It is an update of " A Complete App Using NetBeans 5" by Fernando Lozano, which was originally published in NetBeans Magazine. This article shows how to use NetBeans IDE 7.4 to develop a Swing-based "to-do" application, and it demonstrates the use of a rich client platform (RCP). Practice using NetBeans IDE features that improve code quality and increase developer productivity. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |