DOC PREVIEW
UNF COP 2551 - Study Notes

This preview shows page 1-2-3-4 out of 13 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 13 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 13 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 13 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 13 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 13 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Using NetBeans 6.7 to Create and Run a Java ApplicationNetBeans is an open source IDE (integrated developmentenvironment) available to programmers who want to develop Javaprojects. Since it is an IDE, the tools needed for editing, compiling,building, debugging, executing, and obtaining online help are allintegrated in one graphical user interface. Using these tools effectivelycan greatly increase your productivity. Please see the link on my web page to download the latestversion of NetBeans6.7 bundled with the latest Java, Java 6.You must download these and install them prior to running thistutorial.1. Start NetBeans by selecting NetBeans IDE 6.7 from theStart menu or by double-clicking the desktop shortcut(recommended). If you get a registration box option, you mayregister, if you like (I did). But then you should see a screen thatlooks like this: 2. There is a lot of useful information on these links. To get rid ofthe Start Page, click on the X as shown via arrow.You will see the following screen.3. You will want at least a files pane and a projects pan. You mayselect these by clicking on them in the drop down box underWindow in the menu bar. This will give you a screen that looks likethis:1 4. Most activities in NetBeans are considered ‘projects,’ as all yourprogramming efforts will end up being projects. 5. Under the File menu, select New Project. You will see this NewProject Window in the middle of the NetBeans 6.7 Window23 Before starting, you should create a folder on your desktop entitledCOP2551. Each lab project this semester will be entitled,projectiyouruserid, where i is the number of the project. Forexample, your first project would be entitled: project1jsmith. Project1should be a subfolder within your COP2551 folder. Each project youdevelop will be located in a different subfolder within COP2551, suchas project2jsmith, etc. 1 To continue working on a project that was begun earlier (you willsee a list as you develop projects) , simple click on the desired projectin the Project window and continue development. You must also ensure that the project you are working on is the Main Project,and there can be only one Main project (more later on this).6. New Application: To create and run a new Java applicationyou must first create a project. In the following exercise we will becreating a project named projectiyouruserid.Now, select JavaApplication from the New Project window, and thenclick the Next button below. (If you wanted to develop Applets, youwould select Java Class Library)(Also: select some of the other options and note the Descriptions below.)0012 You will need to make a few changes to the New Java Application Window that will appear: You will need to change entries in Project Name, Project Location, and Project Folder:34 Here are the changes I made. You will tailor yours to your own name, etc. Please be careful here.5 In the Project Name box, I typed project0broggio. As you type in your own project0jsmith, please note that as you type, the text box midway down on the page inserts this Project Name in front of Main. (This is desirable and we will discuss later). I then modified the Project Location text (the Project Folder textbox is filled in automatically for you from the Project Location text). You needto enter appropriate settings for your project now too. You will need to retain your n-number. You can see that I have everything on my desktop via the Desktop, and then the folder COP2551. When you installed NetBeans 6.7, it ‘got’ my n-number. ButI changed the default entries that follow to Desktop, and then the folder COP2551, as discussed.Mine now appears as:Click the Finish button. Now, we’ve got our project set up to really start to program! Here is what you should see (using your name, of course)You will see:1Note all the information that is already supplied for you. Please take a few moments to look these over. Note the content of the files pane. Note that your project name and the name of your ‘main’ module is already established! Note the skeletal code that is already provided for you. This will help to get youstarted, but you will need to understand what is actually being provided for you, since not all IDEs provide the same help.In the Projects Pane, you may plan with the + and – boxes and see the expansions…Note: You may wish to take time out and access your COP2551 folder on your desktop. You will note that a subfolder entitled projectiyouruserid will appear. At this time, you are ready to use the IDE to develop your Java application. I am providing the code for this one (project0) in order to familiarize you with the IDE a little bit and the use of Digital Dropbox for submitting your projects to me.Please note that I use things call scope terminators and rather rigid indentation conventions, which I feel all competent designers and programmers should use.There is more information on these Standards and Conventions on my web page.7. Building the Source Code and Executing it. The purpose of project0 is to familiarize the student with the procedurein using NetBeans IDE and submitting a job to the instructor in proper format for grading. The value of project0 is twenty points and you should get the entire 20 points if you follow the procedure outlined below. Note: This is the time to play with NetBeans to not only submit the required project assignment, but to experiment and play around with the very powerful IDE. The on-line tutorial that comes with your CD is excellent. Take time to learn a few other neat things. Perhaps you may wish to develop an applet or two.As mentioned, your first Java program is provided below. Here’s the code you are to carefully enter into NetBeans, compile and execute: Note: some of these lines are already provided. Enter the lines not present on IDE:/* * Main.java * * Created on July 13, 2009, 12:00pm * * To change this template, choose Tools | Template Manager * and open the template in the editor. */package project0whooper; // enter your projected, such as project0jsmith;/*** * @author n00010109 // provided by the IDE */public class Main { // add code starting at arrow: // Be certain to indent! /** Creates a new


View Full Document

UNF COP 2551 - Study Notes

Download Study Notes
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Study Notes and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Study Notes 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?