Some Java hints

Folks,

A couple of Java-related hints from our experiences in Program #1.

1. Reloading your applet - Hitting refresh in your Firefox browser does not reload your applet code. The only way that I know to do this is to shut down Firefox and then restart it. I believe this also to be true of IE. For this reason, I encourage you to debug your applet code in NetBeans until it is working there. Then, copy the files over to the w: drive and get them up and running on your web page.

2. Java Version woes - I had some reports of Java version problems in some of the applet code. I have not seen this in person, but it is possible that Java V1.6 code might not run on some older browsers. You can change the version used by NetBeans like this:

  • Right-click on your project
  • Select “Properties”
  • At the bottom you should see “Source Level”… this is where you can select/change the version of Java you want NetBeans to use.

3. Cool Javadoc options - Javadoc has two cool options that you probably want to turn on. First, you need to tell Javadoc that you want your “@author” tag to show up in your web pages. Second, you can tell Javadoc to put links directly to your code in your web pages. Here’s what you need to do in NetBeans:

  • Right-click on your project
  • Select “Properties”
  • Select “Documenting”
  • Turn the “@author” tag on
  • Add this to “Additional Javadoc options”: -linksource

Do that, and the regenerate your Javadoc.

cool… yow, bill

3 Responses to “Some Java hints”

  1. Alex Says:

    First comment! Yippie!

    With these hot tips in mind, I’ll re-publish my applet and JavaDoc along with the source code and some informative comments. Look for it sometime this weekend.

  2. Victoria Says:

    Second comment!

    Ok… here’s another useful Netbeans tip
    http://blogs.sun.com/roumen/entry/dilbert_plugin_for_netbeans

  3. wtkrieger Says:

    You can see see some code that uses the Graphics2D class here…
    Alex’s web site is at: http://alexander.bestul.students.noctrl.edu
    Victoria’s web site is at: http://victoria.wang.students.noctrl.edu

    thanks… yow, bill

Leave a Reply