Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

JHierarchicalList, an Extension to org.netbeans.swing.outline.Outline

DZone's Guide to

JHierarchicalList, an Extension to org.netbeans.swing.outline.Outline

· Java Zone
Free Resource

What every Java engineer should know about microservices: Reactive Microservices Architecture.  Brought to you in partnership with Lightbend.

My name is Viacheslav, I live in Russia, and program in Java. For several years, I've been following with interest the development of the NetBeans Platform. At work, I've been mainly working on Java EE technology, while writing something for Swing and the NetBeans Platform has been something I've been doing in my spare time.

Here I want to show a component I wrote that inherits from org.netbeans.swing.outline.Outline. It is called JHierarchicalList. In contrast to the Outline component, JHierarchicalList does not display the entire tree, but only a single path.

I'd like to add that these changes do not affect the data model, since the main work is in the class extended from javax.swing.tree.AbstractLayoutCache.

On the left, you see Outline, on the right, JHierarchicalList:

Sources are being finalized, here is the demo JAR so far. Run it as follows:

java -jar demo-hierarchical-list.jar

 

Microservices for Java, explained. Revitalize your legacy systems (and your career) with Reactive Microservices Architecture, a free O'Reilly book. Brought to you in partnership with Lightbend.

Topics:

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}