One dot per line saves time

Today I want to introduce you to a simple rule that I apply when developing software. This rule often saves me a lot of time and it is simple to apply. I usually write code in Java and so the rule is made for Java programming in the first place, but it might also be adapted […]

Make method pre-conditions explicit by design

A method usually makes assumptions about the arguments that are passed into it by a method invocation. The conditions that the arguments must fullfil are named the method’s pre-conditions. Thus a good method implementation checks if the arguments are in an expected state so that the method can execute.

Often developers use basic data types as method parameters like String, […]

Clean Code with underscores in literals

As of java 1.7 the java language specification allows integer literals to contain underscores in order to make them more readable. If it is applied in a good way it can enormously increase the readability of your code.

In java 1.6 one had to define integer literals like this:

With java 1.7 such integer literals can be […]

Custom swing component renderers

This blog shows how to implement a custom swing component renderer using the example of a ListCellRenderer.
By |October 19th, 2014|JDK, Swing|1 Comment

The MVC pattern implemented with java swing

MVC Pattern Basics
The MVC pattern describes a way to organize the components of a graphical user interface. Therefore it must cover all aspects of a user’s interaction with an application.
If we take an analytic look at a graphical user interface we will understand why the MVC pattern is composed of the 3 elements model, […]

The difference between pojos and java beans

Java Beans and Pojos are often used and misunderstood terms. Some think that a pojo is a java bean and vice versa. In fact it is not. There are differences that matter.
The pojo
If you want to know what a term really means you have to find the source context in which the term has been created. […]