Constructing Packages with BlueJ: ===================================== Say that you want to use BlueJ to construct a folder, Assign1, that contains a package named P. Within package P you wish to insert a class, C.java. Here is what you do: Click on the Project menu, and click on its New Project menu item. A file dialog appears that asks you the name of the folder you wish to create---type Assign1 and press the create button. Important: You can tell BlueJ where on your disk you wish to create the folder, Assign1. Remember where you created it --- this will make your life easier to find your work As a result of the previous step, BlueJ creates a new folder named Assign1, and it opens a new window presenting the folder to you. (Alas, in BlueJ, a folder (directory) is called a ``project''!) Now, we are ready to create the package, P: Within the Assign1 window, click on the Edit menu, and click on its New Package menu item. A dialog appears and asks you for the name of the package ---type P (name of package) and press OK. As a result of the previous step, a folder named P has been created inside folder Assign1 (check with file browser !) Now you are ready to include class C within package P. You can do this two ways: 1. Write it from scratch: double-click on folder P; this opens it and displays a new window. within the window for P, click on the New Class button. A dialog appears and asks for the name of the class ---type C and press OK. The previous step creates a file, C.java, inside folder P. When you open C.java, you will find that BlueJ has constructed an empty class that looks like this: package P; public class C { ... } At this point, you can edit and compile the various java-files as usual. 2. Copy it from somewhere else: Say that class C is already written and saved as the file, C.java, in another folder. You can copy it into the package by: double-click on folder P; this opens the package and displays a new window. click on the Edit menu and then click on the "Add Class from File" menu item. A file dialog appears; use this to locate C.java; once you have located it, press the Add button.