Sign in for recommendations. New member? Start here.

Code Commit: Techniques of Java UI Development

FAIRYUSER rated 7 months agoFeatured Review
In this article, I'm going to make use of the Swing framework simply because it's more widely known. All of the same techniques and processes apply to SWT with equal validity. I'll walk through the steps required to create a simple form UI in the easiest and most maintainable fashio...

Like this page from codecommit.com?

4 Reviews

Characters left: 4000


Cyclohexane01 rated 7 months ago
Oh my god. Just looking at that code makes me feel ill. How can anyone stand to program a GUI in Java? Holy shit could you make it more bloated, please?
MadLep rated 8 months ago
good overview of the design and construction process for building GUIs using Swing in Java
FAIRYUSER rated 7 months ago
In this article, I'm going to make use of the Swing framework simply because it's more widely known. All of the same techniques and processes apply to SWT with equal validity. I'll walk through the steps required to create a simple form UI in the easiest and most maintainable fashion. I'm well aware that there are faster ways of doing this, but in my experience, this process will lead to more maintainable and less rigid UIs. Note: These steps will obviously be different if you're working in a team or with a designer. The intention of this article is not to present the "be all, end all" of UI design practices, but rather to be a set of guidelines for the common-case developer. Design It may surprise you, but the very first step in creating a UI is design. You have to know fairly precisely how you want the UI to look and (more importantly) behave. This step is more than just drawing a few mockups in Illustrator. This is sitting down and hashing out what you want the controls to do when the window is resized, if the state of any controls should be tied to that of others, whether your labels LEFT aligned or RIGHT, etc. Often I find the easiest way to start is with a diagram: This is what my diagram would look like, but it's important to note that this isn't a "one size fits all" style. The point of the diagram is to give you a medium to lay out the semantics of a panel and to help you understand just what it is you have to do. This step becomes invaluable later on as you start actually writing code.
organicpuzzle rated 7 months ago
Good, I was wondering..