All posts in 'Java'

What’s the fuss with Java 8 Optional?

15-Apr-15

I’ve been asked several times lately by colleagues what the Optional<T> is good for, so today some more basic stuff. You can use the Optional class is as an elaborate null check like Optional<String> optionalString = Optional.ofNullable(someString); if(optionalString.isPresent()) { String string = optionalString.get(); }   // Or worse // String string = optionalString.orElse(null); // null […]

Read the complete article »

Spring: Provide Interoperability between JMS and Springs simple WebSocket messaging

03-Mar-15

Nearly 2 years ago, excellent WebSocket Support appeared in Spring 4, easily usable using STOMP over Websockets / SockJS on the client side, backed by a pluggable broker on the server side, which can either be simple broker using scheduled executor services to handle message or a full fledged RabbitMQ or ActiveMQ solution. Using @EnableWebSocketMessageBroker@EnableWebSocketMessageBroker […]

Read the complete article »

Custom editor components in JavaFX TableCells

27-Oct-14

There’s a lot of confusion about custom editor components in TableCells for JavaFX applications. The problem: Someone (like me) implements a custom TableCell with a DatePicker or a ColorPicker for example. A naive solution maybe looks like this. That works in so far that the value is correctly displayed in the ColorPicker and the ColorPicker […]

Read the complete article »