|Sign In/My Account | View Cart|
Review/Preview: 2006 and 2007 in Java
2006 will be remembered as the year that Sun open-sourced Java under the GPL, that EJB 3.0 finally shipped, and that Google surprised everyone with its Google Web Toolkit. But how will history record the results of these events? For the 2006 year-ender, ONJava editor Chris Adamson looks at the year's events through the lens of how they may play out in 2007.
Java Generics and Collections: Evolution, Not Revolution, Part 2
In the second part of an excerpt from Java Generics and Collections, authors Maurice Naftalin and Philip Wadler continue their study of how to adopt Java 5.0 generics in a measured, sustainable fashion. Having shown how to genericize a library while leaving the library in legacy mode, they now present three approaches to the opposite scenario: genericizing a client that uses a non-genericized library.
Java Generics and Collections: Evolution, Not Revolution, Part 1
In this excerpt from Java Generics and Collections, authors Maurice Naftalin and Philip Wadler show how to make the switch to Java 5.0 generics, not by expecting you to flip a switch across your whole code base, but by having you gradually work generics into your code while maintaining compatibility.
Eclipse RCP: A Platform for Building Platforms
Where do you start when building a Java desktop application? All Java gives you by default is public static void main (String); it's up to you from there. Eclipse's Rich Client Platform (RCP) offers a tested design, commonly-needed widgets, a standardized component model, pervasive extensibility, and more. Wayne Beaton has an introduction to get you up to speed with RCP-based development.
Ant 1.7: Using Antlibs
Most Java developers use Ant to do builds and are familiar with its core tasks. But Ant's tasks tend toward an undesirable coupling: everything important had to be a core task because it was hard to distribute new plug-in tasks. Fortunately, Ant 1.7's new antlibs feature makes it much easier to distribute and use new Ant tasks. In this article, Kev Jackson shows you how to use, write, bundle, and test antlibs.
Hacking Swing: A JDBC Table Model
Databases have tables, Swing has tables. Why should it be a hassle to bring the two together? In this excerpt from Swing Hacks, authors Joshua Marinacci and Chris Adamson show you how to put some JDBC behind your table model, and bring your database to life in Swing.
Hibernate for Java SE
For many, Hibernate goes hand in hand with Java EE as part of their enterprise development strategy. But what if you need access to your data access objects outside of the EE container? Jason Lee offers some strategy for getting and using a Hibernate session from Java SE code.
JBoss Cache as a POJO Cache
Typical in-memory cache systems can trip you up in ways you don't expect, from mangled object relationships to overly expensive serialization operations. A POJO cache offers a simpler, lower-maintenance alternative. Ben Wang uses JBoss Cache to show how POJO caches work.
Hacking Swing: Translucent Windows
All Java windows are absolutely rectangular, so you can forget about creating a nice Winamp-like window for your Swing app, right? Wrong. In this excerpt from Swing Hacks, authors Joshua Marinacci and Chris Adamson show how you can use some imaging trickery to create arbitrarily shaped windows with Swing.
Diagnostic Tests with Ant
Determining what's gone wrong with your software--source or binary--in a remote location is no simple task. Before taking a call and walking the user through error-prone troubleshooting, why not collect information about the user's system and the application files? Koen Vervloesem shows how you can do this with Ant.
Introduction to the ASM 2.0 Bytecode Framework
J2SE 5.0 made major changes to the language, and version 2.0 of the ASM bytecode manipulation toolkit is well-suited to handle them. In this article, Eugene Kuleshov shows how ASM 2.0 makes working with bytecode easier, and even offers an example of how to map the external dependencies in an arbitrary .jar file.
Eclipse Plugins Exposed, Part 3: Customizing a Wizard
Emmanuel Proulx's series on Eclipse plugin development continues by showing how to put together a useful data model and a wizard GUI.
Domain Searching Using Visitors
Modern applications typically require domain searching functionality--the ability to search for data within the context of the application domain. In this article, Paul Mukherjee describes an approach to domain searching using the Visitor pattern, and explains its advantages.
Managing Component Dependencies Using ClassLoaders
Use of the Class-Path entry within a JAR file's manifest can help you manage external dependencies--to a point. Once you start using multiple JARs that need incompatible versions of external JARs, problems quickly ensue. As Don Schwarz shows, you can get out of this problem by using your own class loader to manage the dependencies.
Flexible Event Delivery with Executors
Event-handling is critical to any GUI application, and many developers know the hazards of making a method call to unknown or poorly behaved code from the event-dispatch thread. J2SE 5.0's concurrency utilities offer more fine-grained control over how code executes. Andrew Thompson applies that to offer better ways to handle events.
Reducing Upgrade Risk with Aspect Oriented Programming
Upgrading code in the field is usually frowned upon, if not prohibited outright, because of the risk and expense of pushing code changes through a release cycle. But could you just insert the tiny bit of code you need with AOP? Stephen B. Morris looks at how careful design and separation of responsibilities can make this less risky.
Building Modular Applications with Seppia
Aspect-Oriented Programming (AOP) and attributes are two leading-edge programming concepts, each with typical applications. By combining them, using attributes to indicate where AOP code should execute, you can effectively declare new Java syntax. Bill Burke introduces this new technique.
Bitwise Optimization in Java: Bitfields, Bitboards, and Beyond
Flipping bits on and off is the lowest level of computing, and most Java developers are totally isolated from it. But maybe they shouldn't be. In this article, Glen Pepicelli introduces the idea of bitsets--ints and longs whose bitwise representation are the data you're interested in--and how they can be used with mathematical and logical operators to write faster code.
Internals of Java Class Loading
When are two classes not the same? When they're loaded by different class loaders. This is just one of many curious side effects of Java's class-loading system. Binildas Christudas shows how different class loaders relate to one another and how (and why) to build your own custom class loader.
Validating Objects Through Metadata
Metadata, in the form of J2SE 5.0's annotation, allow you to mark up your your code with declarative information, and then use reflection to pull out those annotations at runtime and use them. Jacob Hookom shows how these techniques can be used to validate input to your application.
A Distributed Discussion with Elliotte Rusty Harold
In this interview, Java Network Programming, 3rd Edition author Elliotte Rusty Harold discusses the improvements and hazards of networking in Java, as well as the evolution of Java itself.
URLs and URIs, Proxies and Passwords
Java networking is seldom as simple as it first seems. In this excerpt, one of a series from Java Network Programming, 3rd Edition, Elliotte Rusty Harold shows how to encode and decode URLs, work with URIs, use multiple proxy servers, query servers with HTTP GET, and use password-based authentication.
Dynamic Delegation and Its Applications
Proxy, introduced in Java 1.3, offers an interesting way to provide an interface's implementation at runtime, but there's more that can be done. Lu Jian shows how bytecode manipulation can be used to provide dynamic delegation, allowing you to provide runtime implementations of interfaces, abstract classes, and even concrete classes.
Advanced Synchronization in Java Threads, Part 1
J2SE 5.0 introduces sophisticated new options for coordinating multiple threads. In this excerpt from Java Threads, 3rd Edition, Scott Oaks and Henry Wong look at new scheduling strategies represented by the java.util.concurrent package.
Create and Read J2SE 5.0 Annotations with the ASM Bytecode Toolkit
Continuing his examination of the ASM bytecode-manipulation toolkit, Eugene Kuleshov shows how ASM can be used to access J2SE 5.0 attributes, even from earlier JVM versions that don't support attributes.
Bridging the Gap: J2SE 5.0 Annotations
Annotations, a means of providing your own metadata for your code, are among the major features of J2SE 5.0, but you don't have to move to 5.0 to use them. Kyle Downey introduces annotations and their implementation in several Java 1.4-compatible forms.
Monitoring Local and Remote Applications Using JMX 1.2 and JConsole
The latest release of Java, J2SE 5.0 (codenamed Tiger), formally adds support for the Java Management Extensions (JMX) 1.2. Russ Miles walks you through how to use the JMX support in J2SE 5.0, including the new JConsole application, to monitor and manage your own applications both locally and remotely.
Reporting Application Errors by Email
Even if your application logs an error to a local file, the developer doesn't know there's a problem until a user notices it and sends the log file back. It can be more useful for apps to email their own error messages back. And as Sean C. Sullivan explains, it's not hard to do with either log4j or java.util.logging.
JDemo: Interactive Testing Refactored
The nature of GUI development doesn't lend itself to test-oriented methodologies very well. But that doesn't mean you shouldn't test your components! Markus Gebhard has an alternative: JDemo, a tool patterned after JUnit, for displaying and verifying GUI components.
Building Highly Scalable Servers with Java NIO
For massive, high-performance systems, thread-per-client systems may not scale because of the expense in switching thread contexts. Sometimes, as Nuno Santos explains, you have to go lower-level. In this article, he shows how his team used multiplexing features in java.nio and a Swing-like event dispatcher to achieve extremely high performance.
An Introduction to IKVM
Java and .NET are two different worlds, but they can live within one process with IKVM. This "JVM for .NET" allows .NET (or Mono) to leverage Java code, and vice versa. Avik Sengupta provides an introduction to this important new environment.
Peeking Inside the Box: Attribute-Oriented Programming with Java 1.5, Part 2
Continuing an investigation into generating update messages without explicitly coding them, Don Schwarz tries combining some new approaches, including thread sampling and bytecode manipulation.
A Generic MVC Model in Java
The Model View Controller (MVC) pattern often leads to large blocks of essentially similar code in various classes; exactly the kind of detail that can be abstracted away with Java 1.5's generics. Arjan Vermeij shows how this can be accomplished.
Peeking Inside the Box: Attribute-Oriented Programming with Java 1.5, Part 1
Don Schwarz wants to add a status indicator to his Swing application, but the straightforward way turns out to be inelegant and limiting. In this first part of "Peeking Inside the Box," he considers code generation and bytecode manipulation as alternatives.
Template-Based Code Generation with Apache Velocity, Part 2
Giuseppe Naccarato's investigation of code generation continues with a look at using a language-agnostic model to represent the relationships of classes, attributes, and operations in the code to be generated. Does it work better than something platform-specific? The answer is surprising.
Data Models for Desktop Apps
Andrei Cioroianu shows how to develop data models for Java desktop applications and how JavaBeans and the Model-View-Controller (MVC) pattern can make your code more maintainable and reusable.
SSS (Small, Simple, Safe)
Teaching Java is complicated both by the language's syntax and the huge number of classes in its standard libraries. According to Alper Coskun, one solution might be "Small Simple Safe" (SSS), which tries to alleviate this by giving the user an opportunity to create and relate objects in a very simple GUI.
Prototyping Desktop Applications
Does J2SE provide the functionality your application needs? A great way to find out is by developing a prototype, tackling the hard parts first to see if they can be made to work. Andrei Cioroianu employs Java2D and Swing in developing a prototype image-annotation application.
Declarative Programming in Java
JSR-175 introduces Java annotations, a means of attaching metadata to your Java classes. Narayanan Jayaratchagan looks at how annotations work in J2SE 1.5 and the many ways in which they can be used.
BlackMamba: A Swing Case Study
It's one thing to learn the bits and pieces of a Swing GUI -- how to create a model and wire it up to a JTable or JTree. It's quite another to think through and develop a full-blown application. Ashwin Jayaprakash uses an email client, BlackMamba, to show how the pieces of a Swing application fit together.
Java Desktop Development
Java developers can choose between three primary GUI toolkits for desktop applications: AWT, Swing, and SWT. Andrei Cioroianu looks at the history, pros, and cons of each in this first article in a series on standalone Java development.
Introduction to Aspect-Oriented Programming
Aspect-oriented programming (AOP) offers the ability to overlay new functionality atop existing code not by rewriting and recompiling, but by adding "aspects" to the compiled code. Graham O'Regan has an introduction.
Regular Expressions in J2SE
Java applications that perform text searching and manipulation using
StringTokenizer classes often result in complex code, leading to a maintenance nightmare. Another alternative is regular expressions. Hetal Shah explains how to implement regular expressions using the
java.util.regex package, and how it can make your code easier to write and maintain.
Best Practices for Exception Handling
Java's concept of exceptions and how they're used has led to controversy and, in some cases, bad programming practices. Gunjan Doshi seeks to lay down some best practices for using exceptions in Java.
Subverting Java Access Protection for Unit Testing
Ross Burton describes how to use reflection to subvert Java class-member access protection to improve unit testing, by accessing private and protected members as required.
SearchAssist: A Portable Search Engine in Java
While server-side Java solves many problems, it's not always available. Besides, there's more to a good UI than HTML can provide. Sometimes an applet can fit the bill. Ashwin Jayaprakash demonstrates a search engine applet designed for portability and power.
Readable Java 1.5
Java 1.5 promises several exciting new features: an improved for loop, generics, and improved typing through variance. The proposed syntax doesn't impress everyone, though. Stephen Jungels proposes alternate syntaxes for the new features.
Making Media from Scratch, Part 2
QuickTime is a media creation API. It supports far more than just editing and playing movies -- you can create them, one frame at a time. Chris Adamson demonstrates how to build movies, frame by frame, and even animate still images.
Memoization in Java Using Dynamic Proxy Classes
Memoization, or caching previously computed values of functions, can speed up certain classes of problems. Java 1.3's dynamic proxy classes make it possible to write generic memoization routines. Tom White explores this technique and explains when and how it can improve your performance.
Making Media from Scratch, Part 1
QuickTime is a media creation API. It supports far more than just editing and playing movies -- you can create them, one frame at a time. Chris Adamson demonstrates how to make moves from scratch with QuickTime for Java.
"Head First Java" Author Interview
Kathy Sierra and Bert Bates are the authors of the recently released Head First Java, a language tutorial unlike any other. In this interview, they explain their unique teaching style and how it works in practice.
Re-Introducing QuickTime for Java, Part 2
The QuickTime media API is stable and featureful. Due to its lineage, it's organized a little differently than a normal Java API. Chris Adamson explores the organization of QTJ and demonstrates a small video editor.
A Gentle Re-Introduction to QuickTime for Java
The QuickTime media API is stable and featureful. The Java SDK ships with useful docs and examples. Putting the two together can be painful, though. Chris Adamson presents a gentle introduction to programming QuickTime with Java.
How Servlet Containers Work
Having explained how a Java web server works, Budi Kurniawan next turns his attention to explaining how servlet containers. He presents two examples that handle simple servlets and static content.
How Java Web Servers Work
At the heart, web servers are really very simple. If you can set up a socket connection and parse some headers, you're well on the way to writing your own mini web server. Though Apache and Tomcat are already stable, mature, and featureful, you may find yourself curious as to how they work--or interested in something a little smaller and easier to embed. In this article, Budi Kurniawan demonstrates a basic Java web server.
Enums in Java (One More Time)
Depending on who you ask, the lack of built-in enum support in Java is either a travesty or no big deal. They're convenient in some cases, and are often requested for future versions of Java. John I. Moore, Jr. explores the alternatives for emulating enums in core Java and presents the mini-language jEnum as proof-of-concept.
Reading and Writing Excel Files with POI
The Jakarta POI project provides a nice Java API for reading and writing Microsoft file formats. After learning about the project, most people ask, "How can I write a spreadsheet?" Andrew C. Oliver and the POI folks demonstrate how to read and write Excel files using the Horrible SpreadSheet Format class.
Custom PMD Rules
The real fun of automated code analysis is writing your own rules. In his third article on the PMD project, Tom Copeland shows two approaches to detecting error patterns: writing custom Java code and simple XPath expressions.
Surviving Abrupt Shutdown
Sometimes letting users save their data isn't enough--you want to make prevent data loss. Java provides an elegant way for programmers to execute code in the middle of the shutdown process, thus making sure your clean-up code is always executed. In this article, Budi Kurniawan shows how to use a shutdown hook to guarantee that clean-up code is always run, regardless of how the user terminates the application.
Source code is the canonical representation of a software project, but today's popular languages cannot express all of the design decisions behind a project. Explicit Programming seeks to make that easier, at least in the Java world. Bruce Wallace explains Design Markers, a similar concept that requires no special tools and offers compelling benefits.
Making Java Objects Comparable
Sometimes how objects relate to each other is as important as the existence of the objects. There's no single way to compare them--a Person might be sorted by age, name, or position in a queue. In this article, Budi Kurniawan demonstrates how to make your objects comparable and sortable with java.util.Comparator and java.lang.Comparable.
Parsing and Writing QuickTime Files in Java
Writing QuickTime files in Java is easy, if you understand the file format. Chris Adamson argues that it makes a lot of sense. This article explains how the file format works, demonstrating how to read and write to QT files.
Using the Decorator Pattern
Inheritance is one way to modify the behavior of an existing class, but it's not always appropriate. The Decorator pattern often lets you accomplish the same goal by writing much less code. In this article, Budi Kurniawan shows how to use the Decorator pattern with Swing.
A deeper look at James Elliott's RelativeLayout constraint-based layout manager.
Local Invocation for CORBA
CORBA 2.2 or less does not enable applications to transfer objects from the server to the client by copying. This article explains how to simulate the pass-by-value strategy in CORBA so that a client virtual machine can locally invoke methods implemented on a remote CORBA server.
Self-Playing Media with Java Media Framework
The Java Media Framework may not impress you as a media player client, but when you realize that you can deploy content without requiring a specific player on the user's machine, and that you can bundle the player and the media in a single download, it starts to look very interesting.
RelativeLayout, a Constraint-Based Layout Manager
Theoretically, layout managers can make your app look polished as it moves across platforms. In reality, they tend to be too complex to understand. This article presents a layout manager aimed at mere mortals trying to translate interface ideas into portable and resizable Java implementations.
JFC Swing: The SpringLayout Class
SDK 1.4 includes a new layout manager -- SpringLayout -- that uses the notion of springs and struts to keep everything in place.
Introducing Nonblocking Sockets
Nonblocking sockets, the new I/O API in J2SE 1.4, allow I/O operations on a channel without blocking the processes using it. This will allow for asynchronous high-performance read/write operations that will totally alter the techniques for developing socked-based applications.
10 Reasons We Need Java 3.0
It's now seven years since Sun posted the first public release of Java, and it is showing its age. There are many parts of Java that everyone agrees should be fixed, but can't be for reasons of backwards compatibility. Elliotte Rusty Harold imagines a "Java 3" that jettisons the baggage of the last decade, and proposes numerous changes to the core language, virtual machine, and class libraries.
Java Development Kit for FreeBSD
Efforts are underway to certify a build of the Java Development Kit for FreeBSD. This article shows you how to install the FreeBSD 1.3 JDK.
An Introduction to the Java Logging API
JDK 1.4 includes a new logging API. This article details the new API and includes an example program that shows how to use the API in a production environment.
Java API Map
Is the world of Java getting a little unweildy for you? Use our Java API map and directory to track all significant Java platforms and respective Java APIs. Includes the JAX Pack and MIDlets.
The Java Platform
In this excerpt from O'Reilly & Associates' Java in a Nutshell, 4th Edition, David Flanagan shows you a number of the Java 2SE platform packages, using examples of the most useful classes in these packages.
Database Access Using Lightweight Applets
Using lightweight applet technology, you can bring the full weight of Java's GUI capability and the advantages of client-side dynamic database access to your Web applications. Because the technology employs HTTP to communicate with a database via SqlServlet, lightweight applets perform well, yet remain small enough to have acceptable download times.
Java Programming on the Mac
Macworld week is a good time to seek out connections between Java and Macintosh. Over at O'Reilly Net's Mac DevCenter, Daniel Steinberg's column presents examples for Java developers looking for cross-platform solutions as well as those who want to write Mac OS X-specific applications in Java.
Introducing Automatic Data Expiration
How you choose to expire data can make the difference between an application that scales to enterprise quality and one that doesn't. In the first of this three-part series, William Grosso covers the fundamentals of data expiration, and presenting solutions of increasing functionality.
Java RMI: Serialization
In this excerpt from Java RMI, William Grosso drills down on the serialization mechanism; by the end of it, you will understand exactly how serialization works and how to use it efficiently within your applications.
Generics and Method Objects
O'Reilly's Java RMI author William Grosso introduces you to the new Generics Specification and rebuilds his command object framework using it.
Seamlessly Caching Stubs for Improved Performance
In Part 2 of this RMI series, William Grosso addresses a common problem with RMI apps -- too many remote method calls to a naming service. In this article he extends the framework introduced in Part 1 to provide seamless caching of stubs.
Faster List Iteration with RandomAccess Interface
Merlin's new RandomAccess interface identifies whether a java.util.List class has fast random access. This article tests the impact of RandomAccess in several different loops and shows you how to take full advantage of this interface.
Learning Command Objects and RMI
O'Reilly's Java RMI author William Grosso introduces you to the basic ideas behind command objects by providing a translation service from a remote server and using command objects to structure the RMI made from a client program.
The Preferences API in Java 2SE 1.4 (Merlin)
Explore the Preferences API as it is implemented in Beta 2 of J2SE 1.4 (also known as Merlin).
Catching OutOfMemoryErrors to Preserve Monitoring and Server Processes
Why would you want to catch an OutOfMemoryError? In some cases, doing so can help you carry on some monitoring and server processes beyond such a fatal error.
Java's strong appeal for embedded applications is sometimes offset by concerns about its speed and its memory requirements. However, Vincent shows you techniques to use for boosting Java performance and reduce memory needs.
Learning Polymorphism and Object Serialization
Learn to use polymorphism and object serialization by playing with Brainy Draw.
JVM to .NET: I'm Not Dead Yet!
Although Microsoft is loath to admit it, .NET is really their answer to Sun. However, the Java language, the Java Virtual Machine, and CORBA are still a threat.
Macworld Java Update
Steve Anglin's Macworld Java conference report includes the good, the bad, and the ugly news for Mac OS X developers.
Below are other references available on the web for this topic. Since other sites may change their links, please if you find any that may need to be updated.
Java as a Teaching Language
One measure of the success of a programming language is how readily it is embraced by academia. Java has come a long way since its introduction by Sun Microsystems in 1995, and it is now proving itself in the halls of colleges and universities around the world. Java is well on the way to becoming the predominate instructional programming language. The significance of this cannot be overstated--training our future computer scientists, programmers, and IT (information technology) executives in Java will lead to even more acceptance of the language in society at large, putting Java solidly at the forefront of many IT efforts. [Source: O'Reilly & Associates]
The JavaLobby Foundation Applications (JFA) is an effort to produce high quality, open source, pure java applications in an attempt to demonstrate the power of java. JFA software is released under the JFA License which allows completely unencumbered redistribution and reuse of the code. Applications such as an Application Toolbar, Spreadsheet, Word Processor, Email Client, Zip File Utility, and more have already been started, and some are available for download now. A first class icon collection has already been created and is being expanded every day. Many developers have already volunteered to create these applications, but more are still needed. Besides programmers, the JFA project also needs people to write documentation, create graphics to accompany the programs, and to organize other volunteers. [Source: JFA]
Java 2SE API Documents
Includes essential Java 2SE (SDK), tools, runtimes, and APIs for developers writing, deploying, and running applets and applications in the Java programming language. Also includes earlier Java Development Kit versions JDKTM 1.1 and JRE 1.1
Component Source has all the available JavaBean and Enterprise JavaBean (EJB)components and tools. To find a product choose one of the "Browse by" options listed on the web page or use the Product Search box provided. Please note that the Product Search facility works within the selected filter.
Merlin (JDK 1.4)
This technical overview will give you insight into the various new features and APIs of the upcoming JDK 1.4 -- code-named Merlin -- expected to be released this month. [Source: JavaWorld.com]
JFC Swing Tutorial, Part I
This is Part I of a two-part course on the Fundamentals of JFC/Swing. Part I provides a general introduction to Swing. After you complete it, you will be able to use the Swing component set anywhere you previously used AWT components. [Source: jGuru/Java.Sun.Com]
JFC Swing Tutorial, Part 2
Part II will include information on using Swing's Pluggable Look & Feel and Model-View-Controller (MVC) architecture. In the MVC discussion, you will learn to use the more advanced Swing controls. You will also learn the advantages of designing your user interfaces with the MVC model. Part II will be posted shortly. [Source: jGuru/Java.Sun]
Java 2D API Tutorial
The Java 2D Text APIs are part of the Java Foundation Classes (JFC), and come in the Java Development Kit (JDK) 1.2 download. Java 2D Text is fun and easy to use, and you will find a wide range of 2D Text capabilities in the enhanced java.awt.Font class and the new java.awt.font package. Because the Java 2D Text APIs provide a wealth of functionality, this tutorial focuses on what you need to know to use the java.awt.font.TextLayout class to create exciting, interesting, and interactive styled text in any language supported by the Unicode character set. [Source: Java.Sun]
This is a RMI tutorial session as presented at the 2001 O'Reilly Enterprise Java Conference this year. RMI is important for distributed application development. It is the foundation on which Jini is really built and used. [Source: O'Reilly]
Multithreaded Swing Applications
Swing components are not inherently thread safe, and as a general rule, after Swing components have been made visible on the screen, you can only safely modify their data from the event thread. If you modify Swing component data from any thread other than the event dispatching thread, you must take precautions to ensure data integrity. An exception to this rule is the setText method on a JTextComponent or any of its subclasses, or any Swing component method whose documentation explicitly states it is thread safe. Sometimes, you cannot avoid modifying Swing component data from outside the event dispatching thread after it has been made visible. An example is spawning a thread to handle a long operation such as reading or writing a large file over the net. The advantage to spawning a new thread is that the user interface is made available to the user for other operations during the long file operation. The spawned thread is a new thread, and therefore, not on the event dispatching thread even if it is spawned by an event dispatching thread method. This article explains how to use the InvokeLater method and synchronize keyword to ensure data integrity when modifying data in Swing components. If you are new to multi-threaded programming, see Creating a Threaded Slide Show Applet for an introduction to the threaded applications. [Source: java.sun.com]
JavaBeans in JSP Pages
JavaBeans components are Java classes that can be easily reused and composed together into applications. Any Java class that follows certain design conventions can be a JavaBeans component. JavaServer Pages technology directly supports using JavaBeans components with JSP language elements. You can easily create and initialize beans and get and set the values of their properties. This chapter provides basic information about JavaBeans components and the JSP language elements for accessing JavaBeans components in your JSP pages. For further information about the JavaBeans component model see http://java.sun.com/products/javabeans. [Source: java.sun.com]
Java Application Objects
Many Java Application Programming Interfaces (APIs) are used in application programming. As you learn how to create buttons or write text to files, figuring out how to fit the technologies together into a single application can be difficult and confusing. Seeing an application built from the ground up can be more useful than just reading how to make a menu bar or read a file into a Graphical User Interface (GUI). [Source: java.sun.com]
Java 2SE 1.4 (Merlin) I/O
The name of that JSR is New I/O APIs for the Java Platform. Many people think of the new capabilities as just offering non-blocking I/O operations. However, the new features introduced into the JavaTM 2 Platform, Standard Edition (J2SETM), version 1.4 Beta, include many other new and interesting features. While the API certainly will offer support for scalable I/O operations for both sockets and files, you'll also find a regular expression package for pattern matching, encoders and decoders for character set conversions, and improved file system support like file locking and memory mapping. All four of these new features will be covered in this article. [Source: java.sun.com]