Loading presentation...

Present Remotely

Send the link below via email or IM


Present to your audience

Start remote presentation

  • Invited audience members will follow you as you navigate and present
  • People invited to a presentation do not need a Prezi account
  • This link expires 10 minutes after you close the presentation
  • A maximum of 30 users can follow your presentation
  • Learn more about this feature in our knowledge base article

Do you really want to delete this prezi?

Neither you, nor the coeditors you shared it with will be able to recover it again.


C0-L6 - Netbeans Orientation Tour


Jerry Reynolds

on 10 June 2016

Comments (0)

Please log in to add your comment.

Report abuse

Transcript of C0-L6 - Netbeans Orientation Tour

Netbeans Orientation Tour
Almost every computer these days has a Java program installed on it - it is used to run Java programs that you see on websites. When you see your computer tell you that it is updating Java, this is the program that it is updating. It is called Java Runtime Environment (JRE).
This is not what a Java programmer needs, however.
A Java programmer needs the Java Development Kit - usually called JDK. Sometimes a programmer is called a “developer”, so that’s what makes the difference between the JDK and the Java that everyone gets on their computer. We are using Java SE (Standard Edition) Development Kit.
Java programmers could write all their code in any text document, like Word, or even Notepad. But this means that they have to start from scratch, with a blank document, every single time they want to write a program. Since there are many lines of code that are the same for almost every program, this can get boring...
And so...in steps Netbeans! This is an IDE (Integrated Development Environment). It helps to simplify the programming process by automatically including the basic code that all programs need. And it even will help you debug (find mistakes in) your code, so it is a great addition to our class. We are using version 7, but as the year progresses, and you try to download Netbeans from its site, you will probably see updates to it.
So....Netbeans is what we will open when we work on programs, and it pulls Java stuff (called classes) into it when needed - but only if we tell it to pull these things in. Netbeans only has the basic Java classes, so if we want to get fancier, we have to tell Netbeans what we want. You’ll see that happening as the course progresses.
Well, I think it’s time for you to get a Tour of Netbeans. Double-click, wherever it is located on your computer, to open up Netbeans.
Some of you may be on what is called the Start Page. It can look a little different each time, since it is hooked to the internet and tries to show you new and exciting things in the Java World. It also may show you a list of your Recent Projects, to allow you to easily open them back up. Here’s a screenshot of what mine looks like:
Yours may or may not look exactly like this, but that’s okay, as long as you can identify that it is the Start Page. If Java was your life, you would use this page a lot, but for us, the only useful thing might be the My NetBeans (where your recent projects would be easily accessible).
Depending on how Netbeans was installed at your school, some of you may not come to the Start Page first, but that’s okay. I now want you to go to the important place for us today - The New Project Icon. It is in the top left of your screen, and it looks like this:
Click on it and let’s see what happens...
You should get the New Project Box:
For now, we will be working with a basic Java Application, so you can just click Next. And that will take you to the ALL IMPORTANT NEW JAVA APPLICATION BOX.
Never, ever, ever, never, ever, ever, just click FINISH on this screen!!! If you do, your program may not save correctly, or in the place that you think it is saving to, and you may not be able to send your programs to me properly. So be careful here!!!!
First of all, you can see that this window is called “Name and Location” - you must think about both of these at this point.
Let’s just call this program “Tour” - type that into the Project Name box.
Let’s click on the BROWSE button and find the folder that you would like to save your program into. Never use their default location - you may never find your program again! Or, if your school has security software on it, the program may not be there after you shut the computer down.
The bottom 2 boxes, Create Main Class, and Set as Main Project, should be checked every time. Go ahead and click FINISH when you have done all these things.
You should now be in your actual program, and are ready to write your code. I call this screen your “Work Space”, where you can find all the tools you need for making a great program. Let’s take a look at a few of the most important ones:
On the left, toward the top, is called your Projects Window. You can work on more than one project at a time, but I don’t recommend it. Just to show you, go ahead and click on the New Project Icon, as you did before, Name this second program “Tour 2” and save it in the same place as you did before. You should now see Tour 2 listed:
But again, I don’t recommend 2 at a time, so let’s delete the second one by right-clicking on the words “Tour 2” and choose DELETE. When it asks if you want to delete it all, make sure the checkbox is checked and hit YES. It should then be gone from your Projects Window.
When you want to come back to a program that you have already started from another day, open up Netbeans first. If your most recent program isn’t automatically there, then choose the Open Project Icon and search for its folder. Let’s practice opening...
Close Netbeans.
Open Netbeans up again.
If the Projects Window says “Tour”, then it remembered your latest program. If it didn’t, then the Window will be empty.
Let’s make it empty, so that we all know what to do when it is. (If yours is already empty, read this step, but you don’t have to do it.)
Right-click on “Tour” and choose Close. Do not choose Delete!
Now choose the Open Project Icon and locate the Tour Program.
Click once on the Program title in the list.
Check to Open it as a Main Project.
Click the Open Project button.
Now you can open a new program/project, and can reopen one that has been saved. I cannot stress enough the importance of Name and Location when you first make a New Project, so that you will have no trouble sending the program to me to be graded.
Let’s look at the rest of your Work Space in Netbeans.
The bottom left is called the Navigator. We will not use that window much at first.
The majority of the space is taken up by the Code Window. This, of course, is where you will write your code. You will also notice that there are 2 Tabs at the top, one that says Start Page, which we have seen before, and the other says Main.Java, which is the name given for the Main Project that you are working on at the moment. Other tabs may appear as we get into more programming - at this point, just know that they exist.
To run a program, so that you can see if it is working properly, you will click on its green arrow Icon above the Code Window.
As you write code, you will notice that Netbeans will alert you whenever you make a mistake in your typing, usually by underlining it in red. If you point your mouse at this ‘bug’, it will also try to tell you what the error is, but it may not be obvious to a rookie, so try your best to interpret what Netbeans is trying to tell you. You’ll get better at it as time goes on.
The bottom portion of your Work Space is the Output Window. For several of our first programs, this will be our only way to see the output of our programs. Later, you will learn GUI - Graphical User Interface - which will give you the ability to make your programs very user-friendly and more like what people come to expect in today’s programs.
There are other windows that will appear at times when we are working with programs - they are titled, so you might be able to figure out their purpose. No one can ever really give a full tour of ALL the things that you will find in an IDE - there’s just too much stuff. So, I will try to teach you as we move through the year and encounter new things.
And of course, if you haven’t seen it already, there is a Save Icon next to the Open Project Icon. I recommend hitting Save as often as possible. The nice thing is, every time you RUN your program, the computer automatically saves it, so that’s sometimes a nice thing.
Okay, to finish this Tour, let’s take a look at some sample programs. Close out the Tour program, click on New Project, and open the Samples folder. Then open the Java folder, and you should find sample programs to look at. (If this is not part of the version you have, don't worry about it...)
Take a look at any of them that you want - I personally like the Anagrams and Mars Rover ones, and under the Netbeans Modules, I like the Paint Application. After you open one, just hit the green RUN button and see if you can figure out what the program is all about.
And guess what? When you are done with this course, you should be able to make any of those programs! Isn’t that cool?
I hope you enjoyed this Tour of Netbeans!
Full transcript