DEV Community

Cover image for Why Swing Still Makes Sense for Scientific Desktop Applications in 2026
David Heddle
David Heddle

Posted on • Edited on

Why Swing Still Makes Sense for Scientific Desktop Applications in 2026

Over the past (too many) years, I’ve built scientific tools for physics research and visualization in Java. Those tools gradually morphed into a desktop framework for visualization, scientific plotting and curve fitting, and simulation. Recently, I cleaned up the architecture and published the core to Maven Central.

(A full technical paper describing the architecture is available
on arXiv.)

It includes:

  • Multi-view (virtually extended) desktop infrastructure
  • Thread-safe plotting
  • Integrated thread-safe simulation engine
  • Optional JOGL-based 3D extension

The goal is not to compete with UI frameworks or full-stack Web apps. It is to provide infrastructure for scientific desktop software.

Main project: mdi (all functionality except 3D)
GitHub

GitHub logo heddle / mdi

MDI project (redo of bCNU)

MDI – Modular Desktop Interface for Scientific Applications

Maven Central License Java arXiv

MDI is a Java framework for building scientific desktop applications with:

  • Interactive plotting
  • Simulation engines
  • Multi-view modular architecture
  • Extensible tools and layered drawing
  • Distribution via Maven Central

It is built on pure Swing for long-term JVM stability and zero external runtime dependencies.


Why MDI?

Scientific desktop applications have different needs than typical GUI apps:

  • Long-running simulations
  • Real-time data visualization
  • Multi-document workflows
  • Precise rendering control
  • Stability across Java versions

MDI provides architectural infrastructure for these use cases.

It is not just a widget toolkit.
It is a foundation for building complete scientific applications.


Key Features

Multi-Document Architecture

Each window (“view”) operates independently while sharing:

  • Messaging infrastructure
  • Common models
  • Simulation engine integration
  • Extensible toolbars
  • Layered drawing support

Integrated Plotting (splot)

The built-in plotting module provides:

  • Thread-safe curve updates
  • Swing EDT-safe rendering
  • Curve fitting
  • Lock-free staging queues for background updates
  • Coalesced repaint events

Plots can…

Maven artifact:
io.github.heddle:mdi

3D JOGL/OpenGL extension: mdi-3D
GitHub

GitHub logo heddle / mdi-3D

3D add-on to mdi

mdi-3D – 3D Support for the MDI Framework

Maven Central License Java

mdi-3D is an optional 3D extension module for the MDI scientific desktop framework.

It adds hardware-accelerated 3D rendering support using JOGL while preserving the lightweight nature of the core mdi project.


Why Separate 3D?

Most scientific desktop applications do not require 3D rendering.

Separating 3D into its own Maven module:

  • Keeps the core mdi dependency lightweight
  • Avoids pulling in JOGL unless explicitly needed
  • Reduces compatibility risk with future Java releases
  • Allows 2D-only applications to remain stable and minimal

This design ensures that adding 3D is a conscious architectural choice.


Installation

First include the core mdi dependency:

<dependency&gt
    <groupId>io.github.heddle</groupId>
    <artifactId>mdi</artifactId>
    <version>1.0.0</version>
</dependency>


## Demo Application

The repository includes a full-featured `DemoApp3D` showcasing:

- Interactive 3D globe with poltical boundaries
- a 3D simulation of the free expansion
Enter fullscreen mode Exit fullscreen mode

Maven artifact:
io.github.heddle:mdi-3D

Both the core (mdi) and the extension (mdi-3D) have have multi-view demonstration applications, and their README.md's give instructions on how to run the demos.

Here are some pics from the demo apps.

A traveling salesperson simulation.

A 3D simulation of 50,000 particles undergoing a free expansion.

An example of a 2D histogram rendered with Swing

If you have any questions, don't hesitate to ask.

Top comments (0)