Jetpack Compose for Desktop Milestone 2
Written by Nikos Vaggalis   
Thursday, 03 December 2020

Following its initial announcement of Jetpack Compose for Desktop last month, JetBrains has now announced Milestone 2, updated with a Swing interoperability layer.

As we discussed in Introducing Jetpack Compose for Desktop,

Many have tried to cross boundaries with a framework that can bridge multiple platforms, that is write your UI code once and let it run seamlessly on macOS, Linux, Windows, and iOS. Then Jetpack Compose is Jetbrain's/Google's answer to this multi-platform quest, promising to share large portions of UI code written for Android on, say Windows, without hassle.

So what does Milestone 2 bring? There's a few upgrades.
As we've already noted, since it is underpinned by the ubiquitous JVM, it is compatible with, and able to use, Java graphics APIs like Swing and AWT. The update further introduces a Swing interoperability layer, so that developers can mix Compose elements with regular Swing elements to lessen the friction when gradually migrating their existing applications to Compose for Desktop.

Performance wise, the update enables native speed of Compose for Desktop applications on Apple hardware.

Elsewhere, minor updates include the support for Gradle versions 6.6 and 6.7, improved interoperability with JavaFX, and simplified reuse of icon assets between platforms.

Jetpack Compose for Desktop. apart from an innovation by itself,  also acts as a Trojan horse for Kotlin to infiltrate the developers' mindsets and establish itself as a major player on other platforms and not just Android. Use Kotlin to write your application once and run it everywhere. You could say that this was also Java's promise, achievable to a large degree.

The difference is the Kotlin language which we consider to be better than Java - being expressive and designed for readability it removes a lot of boilerplate code due to an extremely compact and succinct language grammar. Still the feature that makes it stand out from the rest is the inherent distinguishing between nullable and non-nullable data types, a feature that leads to fewer null pointer exceptions and therefore fewer bugs. Statically typed just like Java, it integrates seamlessly with the dinosaur and its libraries to leverage the vast functionality found in Java's ecosystem. It is not then by accident that Compose for Desktop can work with Swing and Javafx too.

The newest build 0.30-build133 has now been released on its GitHub repo

More Information

Compose for Desktop - main page

Github repo

Related Articles

Android Jetpack Compose Is Welcome, But What About The Churn?

Introducing The Android Kotlin Developer Nanodegree

Why Do Android Devs Convert To Kotlin?

Focus On JetBrains Kotlin 1.4


To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.


Free Courses On Becoming A Data Analyst

Microsoft has launched several, free, self-paced courses on Data Analysis using its Power BI suite.

Digital Play Shown To Be Good For Kids

When designed with their needs in mind, video games can benefit children’s well-being. This finding comes research from  UNICEF in partnership with LEGO and the University of Sheffield.

More News

raspberry pi books



or email your comment to:

Last Updated ( Thursday, 03 December 2020 )