Some reader favorites:
EJB fundamentals and session beans
Create a scrollable virtual desktop in Swing
Wizard API updated!
Tim Boudreau has released a new version of the Swing Wizard library (version 0.997) that fixes the WizardException bug reported in JavaWorld's recent Open Source Java Project profile. The article's examples have been reworked to test out the new, improved WizardException. Thanks, Tim, for this helpful fix!
Open Source Java Projects: The Wizard API
JavaScript currently supports the following eleven statements. Note that some of these -- such as comment, var, and new -- aren't bona fide statements, but they are often treated as such. They are included in this discussion for the sake of completeness.
A few of the statements offered in Java are notably lacking in JavaScript. This includes the switch statement, as well as all forms of error-trapping statements (such as catch and throw). JavaScript keeps these statements as reserved words, and perhaps in some future version, they will be implemented.
// This is a simple comment
// This is another comment that spans more than one line. Though the comment wraps to the second line, the first line ends with a "soft return" in the text editing program. No hard return character is inserted.
You can place the // comment characters anywhere on a line. JavaScript will treat all the text on that line after the // as a comment.
MyVariable="This is a test" // assigns text variable MyVariable
Comments are ignored when the script is played, so they do not greatly affect the speed of execution. However, lots of comments increase the file size of scripts and take longer to download to the user's computer over a dial-up Internet connection. For best results, limit comments in JavaScript programs to brief, single lines.
When writing long comments it's better to use the alternate commenting characters /* and */. Text between these characters is treated as a comment. Alternatively, you can start each line with the // comment characters.
// This section checks to see if the Enter key is pressed, // then continues on
or
/* This section checks to see if the Enter key is pressed, then continues on */
The break statement is most commonly used to prematurely end a for loop. For example:
Free Download - 5 Minute Product Review. When slow equals Off: Manage the complexity of Web applications - Symphoniq
![]()
Free Download - 5 Minute Product Review. Realize the benefits of real user monitoring in less than an hour. - Symphoniq