Category General

Java Tip 98: Reflect on the Visitor design pattern

Implement visitors in Java, using reflection Collections are commonly used in object-oriented programming and often raise code-related questions. For example, “How do you perform an operation across a collection of different objects?” One approach is to iterate through each element…

Talkback: Cell phone etiquette

In Dan Briody’s The Ten Commandments of cell phone etiquette he asks for suggestions for additions. In Dan Briody’s The Ten Commandments of cell phone etiquette he asks for suggestions for additions. Thou can make them below. We’ve updated the…

Linux and Java: What’s the scoop?

Discover the skills you need to program Java on Linux Q: I have two requests: I would appreciate a pointer to a list of Web resources that outline how to integrate Java on the Linux platform. What Unix/Linux knowledge should…

Programming XML in Java, Part 3

Programming XML in Java, Part 3

DOMination: Take control of structured documents with the Document Object Model The Simple API for XML (SAX) is an excellent interface for many XML applications. It is intuitive, extremely easy to learn, and, as its name implies, simple. Any Java…

JDBC drivers in the wild

JDBC drivers in the wild

Learn how to deploy, use, and benchmark JDBC driver types 1, 2, 3, and 4 Why should you consider Java Database Connectivity (JDBC) drivers apart from the JDBC-ODBC Bridge? What level of JDBC driver is suited for your application? What…

XSL gives your XML some style | InfoWorld

XSL gives your XML some style | InfoWorld

Use XSL and servlets to style your XML data Wow, you’ve come so far. A year ago you didn’t know what XML was, but now it’s everywhere. You’re storing XML in databases and using it in middleware, and now you…

Java Tip 97: Add drag and drop to your JTrees

Improve JTree usability with drag and drop Implementing drag and drop lets users manipulate data with simple mouse movements and can mean the difference between an efficient or cumbersome application. Unfortunately, one of the more useful and powerful GUI components,…

Using the if-then-else framework, Part 3

Using the if-then-else framework, Part 3

Enhance the framework to support large-scale projects The if-then-else framework is a tool for coding complex branching logic in a maintainable way. In the first two parts of this series, I described how to use the framework in a simple…

Debug with jdb

How do you use this crazy thing? Q: How do you use jdb (included in the JDK 1.2 package) effectively to debug Java programs? I’ve tried many times, but I am successful only in loading a class file to jdb;…