O'Reilly logo

Sams Teach Yourself J2EE™ in 21 Days by Peter Roxburgh, Andy Longshaw, Debbie Law, Dan Haywood, Martin Bond

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Exercise

You have been shown a simple program to display a JNDI namespace as a command line program (JNDITree.java in Listing 3.6). Today's exercise is to write a GUI version of this program using the Swing JTree class.If you already know Swing, you can use JNDITree.java as a guide for your program and go ahead and write your own JNDI browser.

If you do not know Swing, the exercise directory for Day 3 on the accompanying CD-ROM includes a template program called JNDIBrowser.java for you to enhance. The JNDIBrowser program handles all of the Swing initialization, all you have to do is get a list of the names in the JNDI namespace and create a new javax.swing.tree.DefaultMutableTreeNode representing the name and add this to the JTree. When you ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required