Tuesday, October 28, 2008

100 NetBeans day

Today, we will write both console and GUI applications using the NetBeans IDE.

[0] Ask me to talk about "waterfall" programming versus event-driven programming.

[1] Check the NetBeans version on your machine. If it's not 6.1, then go to netbeans.org to download the latest NetBeans (SE version, about 30 MB). If it is, go to the website anyway just to see what's around.

[2] Write Hello, world in NetBeans — tutorial here. The primary difference between this and the Hello we've written before is the complexity of the directory structure. Explore the directories: this structure is typical.

[3] never mind

[4] Now a GUI app that does a little bit of arithmetic and acquaints you with GUI objects: click here.

[5] Here's another simple GUI app that converts between temperature scales: click here. Follow the "programmer's perspective" trail.

[6] I wrote two more programs after this. The first one added a slider and a text box in a frame in the page (screenshot) and initialized the text box to zero. When the user moves the slider back and forth, the value shown in the box changes from -50 to 50.
    The second responds to mouse clicks by drawing a dot where the mouse is clicked (screenshot). For this I used the MouseReleased event.
    I studied the code that NetBeans wrote for my programs (including the grayed-out code) to figure out how to do this.

I think that once you can do these, you can do the Polygon program.

No comments: