How does the JNode gui work?

It seems that everything in the JNode GUI is implemented through the awt/swing components of the jdk. But how do the peers draw on the screen? Does JNode use a X server or the like? How does the JNode wm handle other applications, because for now it seems the defaultLookAndFeel is just applied to every program, making it a very unflexable window manager. I'm also interested how JNode implemented the taskbar+"start button".

The reason I'm asking is because I'm writing my own window manager in pure java (still very early in development). It uses the escher X11 java library to make calls to the X server and I thought perhaps I could contribute to JNode.


The whole drawing/painting in the JNode gui is controlled by the AWT/Swing painting system. The Graphics object either work on a buffered image or on a JNode specific Surface object which talks to the underlying graphics card driver.
The window management is based on Swing JDektopPane and JInternalFrame, we basically reuse that and add a few customizations. This involves some tricks indeed. The taskbar and start button are rather usual Swing components added to the desktop frame which also contains the desktop pane.
When we will have completed isolate support for GUI applications then applications can use thier own L&F. Till then only one L&F is supported and GUI applications run in the same isolate.

Currently there is no X11 support in JNode at all. It would be interesting to start up a gui app in JNode and have the gui displayed by an X server on an other host, as Steve said. I guess Escher (that I'm aware of for several years now) could be used for this. There is also a pure java X server implemented somewhere for the inverse scenario.

Pure java WM

Maybe you can be interested by this.


It is hard to know what to make of Escher. Most of the webpages on SourceForge give errors. The latest SF "news" says that the project is "active again" but there have been no checkins for a 12 months.

Then there is the licensing: Escher is supposedly licensed under BSD and GPL 2, but aren't those two licenses contradictory? This in itself may be a show stopper for us, because our codebase is LGPL.

Finally, there is the question of what Escher actually does. It looks like it provides low-level client-side X11 APIs translated into Java, but there are signs that the implementation is incomplete. On top of that, this would only be part of the solution for JNode. We'd need to build the a new set of peers that mapped from AWT to X11 via these libraries.

There is no X server in JNode

The JNode GUI framework does not include an XServer. AFAIK, the peers talk directly to the framebuffer device. From comments I've seen, I understand that JNode already supports other 'look and feels'. I don't know if per-application tweaking of LAF is feasible in JNode, but if it is, I'm sure we'll get around to implementing it. As for the JNode taskbar etc, take a look at the code Smiling.

Assuming that it makes sense from a technical standpoint, you are welcome to contribute your code to JNode. The caveat is that you will need to license your code as LGPL.

In the long term, it would would be a good idea for JNode to support X as an option. For example, it would be nice to launch a GUI app on JNode, and have its user interface displayed on another machine's display. But this is not a high priority for us yet.


I have written some patches for Escher myself, I believe the project is pretty much entirely in GPLv2. The project on sourceforge isn't very active for the moment but escher is currently being used for a pure java graphical backend + peers implementation (see caciocavallo openjdk project). But this requires an X server to recieve tcp events from the X client (be it through a C Xlib or a Java Xlib), something that is not possible with a simple framebuffer device like the one in JNode. So I'm affraid my code isn't of much use.

Escher & JNode

As a first attempt, it would be interesting to implement a JNode surface based on Escher. Initially this could be used like setting a system property in text mode to specify where the X server is, then by issuing startawt the whole jnode desktop would show up in that specified X server. Would this be possible?


Based on what Roman and Mario spoke about at Fosdem, I think it would be better to take a look at the Caciocavallo project, it might turn out as an very interesting way. Note that neugens = Mario Torre. See more at:,,