|
In This Issue
Welcome to the Java Technology Fundamentals Newsletter This monthly newsletter provides a way for you to learn the basics of the Java programming language, discover new resources, and keep up-to-date on the latest additions to Sun Developer Network's New to Java Center. The Java Technology Fundamentals Newsletter is now available in a blog format. Content will appear throughout the month and include extras. Start reading the Java Technology Fundamentals Blog today! Note: For the code in this issue of Fundamentals to compile, use the JDK 6 software. Basic Java Technology ProgrammingMaking Sense of the Java Platform Classes and Tools Annotations Desktop Java Platform Development Server-Side Java Platform Development Java Technology Training For More Information by John Zukowski Imagine having been given the source code for a project that needs to be maintained, and the maintainer is long gone. You have the task of adding a new feature. Take a look at what you can discover by using a tool such as the Unified Modeling Language (UML) Modeling module of the NetBeans IDE 5.5 to explore the source code and generate UML diagrams of the system. The abook.zip file a project designed by Sun Microsystems. It is a basic address-book management system. Using the NetBeans IDE and the UML Modeling module, you'll discover the objects in this application. First, you need to install NetBeans from if you don't have it already. Launch the NetBeans IDE. By default, the UML Modeling Module is not part of the installation, so you must add that after installing and launching the IDE. Go to the Update Center's Tools menu, then click on Update Center to launch the wizard:
Make sure you have selected the NetBeans Update Center option. When you select Next, the wizard connects to each Update Center for potential modules to add, such as the UML Modeling one. Although you can also install the UML Bank App Sample module, it is the UML Modeling module under Features that you need to install for this article.
Although the UML Modeling module is only 10 KB, pressing Add with UML Modeling selected will add not only the selected module but all of its dependencies, totaling over 18 MB in this case.
Press the Next button at the bottom to add all the necessary modules and get the UML Modeling module, after you accept a few licensing agreements.
After the 17 modules, including UML Modeling, are installed, press the Next button to see the list of certificates you must view before installation, and then press Finish. This will prompt you to restart the IDE to install the modules.
You'll see the IDE exit and restart while it installs everything. Once it has restarted, you can now start analyzing the provided source. To open this project, select the File menu, then the Open Project menu item. You'll need to locate the top-level directory for where you unzipped the ZIP file. For instance, if you unzipped everything to C:\work, select the ABook entry in the C:\work directory, then press the Open Project Folder button. Loading causes a complaint about the derby JAR file not being found. Just click past the problem for now. You're not going to run anything just yet. These detailed instructions are for users of the NetBeans IDE. The NetBeans IDE runs on the Java platform, which means that you can use it with any operating system for which a JDK 6 is available. This tutorial covers the following:
The Swing toolkit supports the ability to transfer data between components within the same Java application, between different Java applications, and between Java and native applications. You can transfer data by way of a drag-and-drop gesture or by using the clipboard to cut, copy, and paste. Drag and Drop You can easily enable drag-and-drop support for many of Swing's components, sometimes with a single line of code. For example, it's trivial to enable drag-and-drop and copy-and-paste support for JTable, Swing's table component. All you need to provide is the data representing the selection and the way to get your data from the clipboard -- that's it. Cut, Copy, and Paste Most of the text-based components, such as the Editor pane and text field, support cut, copy and paste out of the box. Of course, menu items need to be created and "wired up" to the appropriate actions. Other components, such as list and tree, can support cut, copy, and paste functions with some minimal work. PasswordStore supports data transfer in a variety of ways:
Java Platform, Enterprise Edition 5 (Java EE 5) is the latest version of the premier platform for developing robust, scalable enterprise applications. Here are some highlights:
| |||||||||||||||
|
| ||||||||||||