Syllabus
Here is the original pdf of the syllabus, and below is an updated weekly outline.
Week 1 - August 27
- Go over syllabus, course goals
- See first day of class announcement
- We discussed what is java, what can you do with it. See The Java Platform in the Java Handbook.
- We went through Assignment 1: The Greenfoot quick intro
- For that assignment, you need to download and install Java and Greenfoot.
- To install the Java JDK (and Netbeans for future use), click the orange button on the http://javafx.com/ site for instructions.
- See the Greenfoot downloads page for info on getting Greenfoot.
- For that assignment, you need to download and install Java and Greenfoot.
- I also passed out 2 optional short readings concerning the motivation for this course:
Week 2 - September 3
- Objects and Classes
- Download and try out the turtlegraphics scenario (zip file, extract by right clicking)
- Readings for next week
- We'll build onto the turtle graphics Greenfoot scenario illustrating objects and classes, inheritance and overriding methods.
Week 3 - September 10
- Java Basics
- We'll continue working with the turtlegraphics scenario from last week, illustrating Java control flow, operators, numbers, strings, ...
- Also we will check out the animation scenario.
- Introduce Assignment 2, another Greenfoot activity:
- Look through the Greenfoot scenarios page and gallery website for example Greenfoot programs.
- Advanced students, for assignment 2, create your own original Greenfoot scenario, game, or whatever you wish, illustrating your knowledge of Java programming.
- Beginning students, pick a simple existing game or scenario that interests you or can be adapted to something you are more interested in, and create your own version of it.
- For example, take the animation scenario and customize where the bird moves, or add other objects, or change it to a different animation.
- Or take the turtlegraphics scenario and create new and original turtles, for example turtles that draw other shapes (like a face), or turtles that react to other turtles, etc.
- See this video on how to create a new Greenfoot scenario from scratch, as well as other videos on things such as movement, or using the mouse for control.
- The point of the assignment is to get some practice with Java Basics and Objects and Classes, and to have some fun doing it.
- I will guide students on their Greenfoot projects in next week's class, which is optional if you don't need help. Also, you can email me at any time for help.
- Shoot to have your Greenfoot project done in 3 weeks (October 1st). We don't have class Wednesday September 24th (conference).
Week 4 - September 17
- Class optional
- Help with Assignment 2
- The Java Cheat Sheet should be ready by today.
Week 5 - September 24
- NO CLASS - Open Education Conference
- Email me if you need any help with the assignment, or you can schedule a meeting with me at the lab or my office Monday or Tuesday of this week.
Week 6 - October 1
- Introducing the Netbeans IDE and Swing
- Assignment 2 due
- In class we will go through the introduction to gui building tutorial, to build a java swing application that adds 2 numbers together.
- Introduce Assignment 3, due in 2 weeks:
- Build a Java desktop application in Netbeans that converts temperature values between Fahrenheit and Celsius
- This tutorial covers the first part (converting one way), but you'll need to extend it to convert both ways.
- Also see if you can show an error message if a textfield is empty or has a non-numeric value. You can do this by catching the NumberFormatException when calling Double.parseDouble. See this tutorial on exception handling.
- Also see if you can format the converted values to only 2 decimal places, by creating a new DecimalFormat("#.##") instance and calling it's "format" method.
- Extra: Can you convert the values by listening to the lostfocus or actionperformed events of the textfields? actionperformed is called when you hit the enter key in a textfield.
- Advanced students: You can do this tutorial instead: Build a Java Desktop Database Application
- Build a Java desktop application in Netbeans that converts temperature values between Fahrenheit and Celsius
- Readings for next 2 weeks:
- Swing Documentation, in particular:
- Netbeans Documentation, in particular:
- Getting Started With the NetBeans IDE Tutorial
- Using the Java Editor (code completion, has a video)
- Designing a Swing GUI in Netbeans (optional)
- Swing Application Framework
Week 7 - October 8
- We'll run the SwingSet3 demo of Swing's features (click the orange launch button)
- Work on Assignment 3
- Class optional
Week 8 - October 15
- Java Graphics
- Assignment 3 Due
- Introduce Assignment 4, due in 2 weeks:
- Assignment 4 is to create an application or applet that uses Swing and Java2D to show a ball dropping and bouncing like a real ball. You should be able to click on the ball or the panel to re-drop the ball.
- This applet from a course on java and simulations can help get you started, but note that it is an applet, not an application. You can do the assignment as an applet if you wish, but that makes it harder to do in netbeans.
- See also the 'animated colored balls' demo on the java2d samples page.
- To start, create a new Java Desktop Project in Netbeans. Then create a subclass of JPanel. To do this right click on your project and select New->JPanel Form. You might call it BallPanel, for example.
- Override the paintComponent method in your BallPanel source code. Click inside the class body, then hold down control-space, and start typing paintComponent. Hit return, and netbeans will generate the override for you. Inside that method is where you do all your drawing.
- (optional) Make it so the BallPanel resizes when the window is resized.
- (optional) Let people change gravity, to make the ball drop faster or slower, and/or change elasticity, to make the ball lose some energy each time it bounces (like the above applet does).
- (advanced students, optional) Create another JPanel control that graphs the height of the ball over time. I can send you some sample code.
- Readings for next 2 weeks:
- Java 2D
- Getting Started with Graphics and the WeatherWizard example
- Java 2D Demos - See in particular the last demo. You can also run the Java2Demo applet that comes with your JDK installation, possibly located at: C:/Program Files/Java/jdk1.6.0_10/demo/jfc/Java2D/Java2Demo.html
- Physics Simulation and Java: Java2D - see sections under Lecture 7B box on left side
- (advanced) Filthy Rich Clients - examples are in the form of netbeans projects
- (advanced) Space Invaders Game
- Applets and java Web Start
- Java 2D
Week 9 - October 22
- Work on Assignment 4 (Java Graphics)
- Class optional
Week 10 - October 29
- Assignment 4 Due
- JavaFX (site also available in Chinese)
- http://javafx.netbeans.org/download-compiler-JFXplugin.html - latest version of netbeans javafx plugin
- OpenJFX - site of the open source JavaFX compiler, with links to samples
- Planet JFX - tons of tutorials and JavaFX code examples
- Creating a simple JavaFX application inside Netbeans
- JavaFX Best Practices - samples included with latest version of javafx netbeans plugin (go to file->new project->samples->java fx->best practices)
- JavaFXApplet - how to make one in netbeans
- Duke Potato - Mr. Potato-like demo
- In class we'll go over the following topics:
- Java 6 update 10
- JavaFX vs. Java: Declarative vs. Imperative Programming, comparing the two
- JavaFX demos we'll make in class:
- JavaFXApplet - shows how to make a basic javafx applet in netbeans
- Tumbling Duke - an example of animation in javafx (needs to be converted to work in the new compiled javafx)
- Details about Assignment 5:
- We will walkthrough building an example javafx app next week.
- If you want to try Assignment 5 from home, see if you can recreate something like the Duke Potato javafx applet above, using your own graphics. You can drag and drop images and shapes around.
- If you are an advanced programmer, see if you can implement a way to take snapshots. Save the graphics to an image file in a format like png, gif, or jpg.
Week 11 - November 5
- Work on Assignment 5 (JavaFX)
- If you want to try this from home, you can just make a javafx demo in which you can drag around pictures, like the Duke Potato demo above. Use your own pictures.
- But in class, we will take this SVG vector graphic image of the US states and convert it to JavaFX code using Project Nile.
- Then we'll create a JavaFX project in Netbeans and turn that image into an application in which you can drag around the states.
- Here is an online demo of the app we'll be building. It is slow to load, I didn't optimize the applet.
- Class optional
Week 12 - November 12
- Assignment 5 due
- Eclipse IDE - alternative to Netbeans. Download the Java EE version.
- GWT - Google Web Toolkit
- GWT Quick Start
- Using Eclipse, GWT, GWT Designer
- GWT Designer, free trial for 14 days, and videos about using it
- GWT & Netbeans Example
- Using GWT & Netbeans (older)
- Android - Google's java-based cell phone platform
- We installed the Android sdk and eclipse plugin, and ran the sample moon lander project, and looked at the other apps installed on the google phone (including google maps).
- Tom Caswell has posted a list of the best android applications. See for example this video demo of ShopSavvy (formerly GoCart), in which you can scan a barcode with your phone's camera and then it looks up prices at nearby stores and online.
Week 13 - November 19
- Work on getting demos ready.
- Class optional
Week 14 - November 26
- NO CLASS - THANKSGIVING BREAK
Week 15 - December 3
- Assignment 6 Due
- Class Presentations & Demos
- Give a demo and presentation about some development tool or language for the java platform, such as Project Wonderland, jMonkeyEngine, Scala, Groovy/Grails, java ME or Google Android (for cell phone applications), PulpCore, etc.
- or various java libraries, like Open Source Physics, Piccolo2D, JScience, JFreeChart, WorldWind, etc.
- Here are links related to Project Wonderland, a 3D multiuser environment, similar to Second Life:
- some videos showing Project Wonderland
- The main documentation and tutorials
- Project Wonderland World Builder - GUI for creating worlds
- Blender and Google Sketchup, free tools for creating 3D models
- Plans for the upcoming version 0.5, which will be rebuilt using jMonkeyEngine
Week 16 - December 10
- FINALS WEEK - no class, no final
Groups:
Disclaimer
Any opinions expressed here, except as specifically noted, are those of the individual authors or commenters and do not necessarily represent the views or policies of the Department of Instructional Technology and Learning Sciences, the Emma Eccles Jones College of Education and Human Services, or Utah State University.