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

Creating a Personal Repository of GUI Components for Java and Swing

DZone's Guide to

Creating a Personal Repository of GUI Components for Java and Swing

DZone user Hugo Lopez-Fernandez shares his homemade personal repository of GUI components. Feel free to use and contribute!

· Java Zone
Free Resource

Try Okta to add social login, MFA, and OpenID Connect support to your Java app in minutes. Create a free developer account today and never build auth again.

In this post I would like to tell you why I decided to create and maintain a repository of Java/Swing based GUI components (GC4S).

In the past few years, I have been involved in the development of several Java applications with Swing-based GUIs. When starting a new project, it was usually needed to use components already developed in previous projects so that I could go there, look for them, and bring them into the new project via copy and paste. These components were simple interfaces: a JList with buttons to move up/down its items, a JTabbedPane with closeable tabs, a JTextField showing a file selection within a button to browse and select files, and so on.

I thought that it was desirable to have all these repeated components together so that whenever I need them I just have to look there and not in different projects. For these reasons, I decided to start my own collection of GUI components for Swing (GC4S) almost two years ago. Since then, I have been adding different useful, reusable components along with examples of use (see package es.uvigo.ei.sing.hlfernandez.demo).

As an example, the image bellow shows an screenshot of the JListPanel component. This component is formed by a JList with buttons to perform common actions: move item down, move item up, select all, and clear selection (from left to right).

An screenshot of the JListPanel component.

Probably there could be more components and the current ones could be improved, so that I invite you to collaborate in any way you wish.

That’s it! I hope you enjoyed this brief post.

Build and launch faster with Okta’s user management API. Register today for the free forever developer edition!

Topics:
java ,swing ,swingx ,gui ,gui tools ,java gui ,library ,graphical user interface

Opinions expressed by DZone contributors are their own.

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

{{ parent.tldr }}

{{ parent.urlSource.name }}