ii
Browse Path. . . . . . . . . . . . . . . . . . . 4-7
Where are my files? . . . . . . . . . . . . . . . . 4-7
How JBuilder finds files when you
drill down . . . . . . . . . . . . . . . . . . . 4-7
How JBuilder finds files when
you compile . . . . . . . . . . . . . . . . . . 4-8
How JBuilder finds class files when
you run or debug . . . . . . . . . . . . . . . 4-8
Packages . . . . . . . . . . . . . . . . . . . . . . 4-8
Source Root + Package Path = .java file
location . . . . . . . . . . . . . . . . . . . . 4-8
Out Path + Package Path = .class file
location . . . . . . . . . . . . . . . . . . . . 4-9
Using packages in JBuilder . . . . . . . . . . 4-9
Package naming conventions . . . . . . . . .4-10
Creating a new project. . . . . . . . . . . . . . .4-10
Creating a new project with
the Project Wizard . . . . . . . . . . . . . .4-10
Creating a new project without using
the Project Wizard . . . . . . . . . . . . . . 4-11
Importing an existing file . . . . . . . . . 4-11
Opening an existing project. . . . . . . . . . . .4-12
Managing projects with the AppBrowser . . . .4-12
Using the Project Browser to
manage projects. . . . . . . . . . . . . . . .4-13
Adding project folders . . . . . . . . . . .4-14
Using the Opened Files Browser in
project management . . . . . . . . . . . . .4-14
Using the Directory Browser to
manage projects. . . . . . . . . . . . . . . .4-15
Working with files . . . . . . . . . . . . . . . . .4-16
Creating a new file . . . . . . . . . . . . . . .4-16
Adding existing files to a project . . . . . . .4-17
Adding a Java class to a project. . . . . . . .4-18
Adding a package to a project . . . . . . . .4-18
Removing a file from a project . . . . . . . .4-18
Opening a file outside of a project . . . . . .4-19
Working with multiple projects . . . . . . . . .4-19
Switching between projects . . . . . . . . . .4-19
Editing a file in another project
that is closed . . . . . . . . . . . . . . . . .4-19
Saving multiple projects . . . . . . . . . . . .4-20
Closing multiple projects . . . . . . . . . . .4-20
Chapter 5
Designing a user interface 5-1
About components and containers. . . . . . . . 5-2
What are components?. . . . . . . . . . . . . 5-2
Component categories . . . . . . . . . . . . . 5-3
UI components. . . . . . . . . . . . . . . . 5-3
Menu components . . . . . . . . . . . . . . 5-4
Data express components. . . . . . . . . . 5-4
Other JavaBeans components . . . . . . . 5-4
Which component should you use?. . . . . . 5-4
What are containers? . . . . . . . . . . . . . . 5-5
Windows and Panels . . . . . . . . . . . . 5-5
JBuilder’s visual design tools . . . . . . . . . . . 5-6
Requirements for a class to be
visually designable . . . . . . . . . . . . . . 5-9
How JBuilder determines which
designer to use. . . . . . . . . . . . . . . . 5-10
Laying out your UI . . . . . . . . . . . . . . . . 5-10
Basic design tasks . . . . . . . . . . . . . . . 5-11
Starting your UI project using wizards . . . 5-11
Using the Application Wizard . . . . . . 5-11
Using the Applet Wizard . . . . . . . . . 5-12
Opening the UI Designer . . . . . . . . . . . 5-13
Adding components to the UI container . . 5-14
Code generated by the UI Designer
when adding a JavaBean . . . . . . . . 5-15
Selecting components in your UI . . . . . . 5-16
Adding components to nested
containers. . . . . . . . . . . . . . . . . . . 5-17
Moving and resizing components . . . . . . 5-17
Cutting, copying, and pasting
components . . . . . . . . . . . . . . . . . 5-18
Deleting components from your UI . . . . . 5-19
Undo/Redo . . . . . . . . . . . . . . . . . . 5-19
Grouping components . . . . . . . . . . . . 5-19
Adding non-UI components (menus,
dialogs, and database components) . . . . 5-20
Adding menus . . . . . . . . . . . . . . . 5-20
Adding dialogs. . . . . . . . . . . . . . . 5-20
Adding database components . . . . . . 5-21
Changing the look and feel of your UI . . . . . 5-21
Serializing components in the UI Designer . . 5-22
Fast track to serializing . . . . . . . . . . . . 5-23
Serializing a ‘this’ object . . . . . . . . . . . 5-23
Using Customizers in the UI Designer . . . . . 5-25
Keyboard shortcuts in the UI Designer. . . . . 5-26
Using the Component Tree . . . . . . . . . . . 5-26
How the Tree is organized . . . . . . . . . . 5-27
Icons in the Component Tree. . . . . . . . . 5-27
Changing a component name in
the Tree . . . . . . . . . . . . . . . . . . . . 5-28
Setting component properties in
the Inspector . . . . . . . . . . . . . . . . . . . 5-28
Opening the Inspector . . . . . . . . . . . . 5-28
评论0