Running Vaadin 24 with Gradle on Java 21

Gradle has not been officially released for Java 21, but it works sufficiently well with Gradle 8.4 or later for compilation and execution. Essentially, this means that Gradle cannot run on Java 21 LTS just yet. I will briefly demonstrate how I managed to upgrade to Java 21 LTS in my environment using IntelliJ. Install Java 21 (I’m using Adoptium Temurin) via sdkman. Pre-requisites: Install Java 21 only on your production system. Use somewhere in your code a command which is unique to the latest Java 21 (in this case.getLast() on a List. ...

October 12, 2023 · 2 min

Translating a Vaadin DatePicker

Translating (internationalization of) the default English DatePicker in Vaadin (Flow) is quite straightforward. I created a compact subroutine for effortless reuse in all of my date pickers. // Declaration private final DatePicker birthday = new DatePicker("Geburtstag"); // Set German DatePicker birthday.setI18n(Parsers.setGermanDatePicker()); The code above calls the “setGermanDatePicker” method, which is located in the “Parsers” class in my specific case. /** * Set German DatePicker * Fill the DatePickerI18n with German values (First day Monday, etc.) * * @return */ public static DatePickerI18n setGermanDatePicker() { DatePickerI18n dpI18n = new DatePicker.DatePickerI18n(); dpI18n.setDateFormat("dd.MM.yyyy"); dpI18n.setFirstDayOfWeek(1); dpI18n.setToday("Heute"); dpI18n.setCancel("Abbrechen"); dpI18n.setMonthNames(List.of("Januar", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember")); dpI18n.setWeekdays(List.of("Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag")); dpI18n.setWeekdaysShort(List.of("So", "Mo", "Di", "Mi", "Do", "Fr", "Sa")); return dpI18n; } It should be simple to adapt the above code for other languages or more complex situations, such as translating based on the locale passed to the function. However, I only require German for this Vaadin app. ...

September 8, 2023 · 1 min

JavaFX or Swing in 2023?

Are you wondering whether to use JavaFX or Swing for your desktop application development in 2023? Despite Swing’s stability over the years, there hasn’t been much development in new features. Meanwhile, JavaFX is still gaining ground, but it’s difficult to find up-to-date information on its future. Some developers even claim that desktops are no longer relevant in the age of Electron and Tauri. However, JavaFX is still a popular choice in the professional sector, and recent developments suggest that it’s not going away anytime soon. In this article, we’ll explore the current state of JavaFX and Swing and what you can expect in the future. ...

April 18, 2023 · 2 min

Rust versus OpenJDK Trademark Policy

Looks like an April Fool joke, but it’s not! This discussion template looks a bit cluttered, compared to the OpenJDK version: https://openjdk.org/legal/openjdk-trademark-notice.html

April 11, 2023 · 1 min