Java Tutorial Community: JTree and Borders Code Samples

I've been working away on building "code samples" for the Java Tutorial Community Portal. Each one is an example of a piece of code that at one time or another I've found useful. I'm not sure which ones will be interesting or even worthy of a full on tutorial. I'm just posting them and looking for feedback. I have four code samples today.

1. SwitchRootDemo - Demonstrates how to change the root of a default tree model.

2. NodeRolloverDemo - Demonstrates how to highlight a node in a tree when the mouse is over it.

3. FlexibleSearchTreeDemo - Demonstrates how to expand the searching functionality of JTree. Also has RegEx support.

4. CustomBorderDemo - Demonstrates how to use Java2D to create a custom border.

I have a few other examples in the works for trees. I hope to post that in a few days.

 

 

0

Collin Fagan is a software engineering contractor located in the Chicago suburbs. He holds a BS in Computer Science from the Rochester Institute of Technology. Collin has worked in the Medical, Produce Warehousing and Telecommunications industries on a wide assortment of projects ranging from customized Linux thin clients to highly concurrent telecommunications control systems. His favorite language is Java and devotes much of his blogging time to Swing and Java2D. Collin is a DZone MVB and is not an employee of DZone and has posted 9 posts at DZone.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)

Comments

Geertjan Wielenga replied on Tue, 2008/06/03 - 11:14pm

Thanks Colin!

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.