Graphical Java Development Tool JBuilder 9.0 (3)

xiaoxiao2021-03-06  218

3) Object browsers choose one control on the user interface designer, the object browser appears in the lower right. Object browsers have a very important role in program development, which is the basis for user visual programming. The main role of the object browser is to provide users' access to the properties of the object, such as read and modification. At the same time, the object browser also provides an event of an object (Events) settings, which can often be completed in object-oriented technology, and even these change properties and event work are all written programs. . This greatly increases the reuse of the code, which is the advantage of object-oriented technology. IV) User Interface Designers Since the current user's demand is gradually improved, the current visual programming has replaced the design method of the traditional user interface. In the visual programming, direct contact between men is mainly implemented by some windows and dialogs. JBuilder9 is no exception, and it also implements a form through these windows and dialogs. The controls required by the user can be placed directly on the form and use these controls to implement complex features. User Interface Designer is the most commonly used tool in writing programs. The user interface designer will appear when the user is designed to design the interface design. Users can use the various controls provided by JBuilder to build their own program interface. At the same time, JBuilder9 also automatically generates corresponding code for these interfaces to provide users with programs. Next, you must set the property by the user to write some code that implements user-specific functions. This reduces the complexity of user interface design, and the main energy of users is put into how to implement and strengthen. 5) The source code editor requires the corresponding program editor, and JBuilder9 also provides such an editor. When performing programming, simply click the Source page in the file view tab. The source code editor will use it to use it to edit the JBuilder program. For source code editors, users can also set according to their preferences and habits, their setting methods are mainly: display the IDE Options dialog box by clicking Tools-> IDE Options, in this dialog, the window size, font size And other information. The tab open by Tools-> Editor Options menu item can be set to the editor, display, color, code preview, template, Java structure, etc. For example, users can set their favorite editing templates. The use of the code touch board can also speed up the speed of programming. JBuilder9 has predefined for the code template, including class declarations, if statements, if else statements, TRY / CATCH statements, and WHILE and other templates. In the program code editor, if the user wants to help, you can get the corresponding help as long as the mouse is parked on the keywords, objects or other tags you want to query, then press the F1 key. When a new application is created, JBuilder 9 creates a unit file Frame1.java for the main form in the code editor. If you want to access another file in the Source Editor, just click the appropriate file in the engineering window. When the program is compiled, if an error occurs, the error message is highlighted in the source code edger in the source code edger in the message box window. Users can quickly locate methods, properties and events that require findings in the source code editor. In addition, the bidirectional design tool supports modification of the visual editor to the code while reflecting in the design view. JBuilder9's code preview function (CodeInsight) can display a pop-up window associated with the context in the editor. It can help users write Java code quickly and accurately.

For example, click on an object, immediately appear on the corresponding position, and the user can quickly select the desired content. The code preview feature helps the user displays the data member and method list associated with the context. The parameter list (ParameterInsight) of the method to be used in the current code, can be accessed through the class list (ClassInsight), structure window Errorinsight and the value of the variable value and expression when debugging. 6) Error check and commissioning in JBuilder9, can display the code error of the current row with the red dot in the editor, but does not display logically errors, and running errors, so you need to further understand how to check and check and Debug, troubleshoot logic and runtime errors. First, you have to make a breakpoint setting. The method is very simple. When you click on any row of statements in the editor, you will automatically set this line to breakpoints. The above breakpoint is just the simplest discontinuation point, and there are other types of breakpoints. There are 5 types of breakpoints: line, Exception, Class, Method and Cross-Process. Specific meaning, please refer to the help information. The user can also display the error file Project menu item to enter the program's debugging interface by selecting Debug in the Run menu. When debugging and running the program, the error is displayed (the text of the red part), where the name and the program line, click this section, and will be cut into the file in the editor, and display the error of the error with the error. When the user needs to observe the object, first add observation objects, the method is to click the Add Watch menu item in the RUN menu, then find the breakpoint of the object, and then run the debug project to the debug state. 4. Develop a simple application in JBuilder 9 In JBuilder 9, the general process of writing programs in JBuilder 9 includes the following four steps: (1) establish a project file. (2) Generate the program frame and interface with the wizard. (3) Manually modify the program code. (4) Compile and run the program. Here we only introduce the "fully automatic" method of the generator, without manually modifying the program code. After understanding the integrated development environment, we can now start using the application wizard provided by JBuilder9. The development process of the JBuilder9 application will be described below to construct a simple framework application as an example. 1. Creating engineering users using ProiOct Wizard can create projects using JBuilder9 Project Wizard. The project is called Example.jpx. The project file contains the directory information where other files are located. The specific steps of creating projects using Project Wizard are as follows. (1) Select the File-> New ProIect menu item, the dialog box as shown in Figure 19.

Figure 19

(2) In the Name (Name) text box, enter the example, other options use the default value. (3) Click the Next button to enter the dialog box as shown in Figure 20.

Figure 20

(4) Keep the default settings, click the Next button to enter the dialog shown in Figure 21.

Figure 21

(5) Enter EXAMPLE in Title and enter the relevant Description information and Author (author). (6) Click the finish button to complete the engineering settings, and JBuilder will automatically generate project EXAMPLE. 2. Creating an application using Application Wizard We can use Application Wizard to create a Java application, the specific steps are as follows. (1) Select the File-> New menu item, the Object Gallery dialog box appears. As shown in Figure 22, the dialog provides a wizard that creates a variety of different files.

Figure 22

(2) Click the Application Icon, the Application Wizard dialog box appears. As shown in Figure 23, keep the default setting, click Next to enter the application wizard. Figure 23

(3) As shown in FIG. 24, enter Frame1 in the Class text box, enter Example in the Title text box.

Figure 24

(4) Check the Center Frame On Screen check box, allow the application to run at the center of the screen, click the Next button, enter the application wizard step 3, as shown in Figure 25.

Figure 25

(5) Keep the default setting, click the Finish button, complete the Java application settings, the system automatically establishes the Example.java and Frame1.java programs and add it to the project, and automatically generates the application interface. Source program. Click Frame1.java and Example.java to view the corresponding source code, as shown in Figure 26.

Figure 26

Select the Run-> Run Project menu item, or press shortcut F9, the application will run the application. The result is shown in Figure 27.

Figure 27