Motif is the industry standard graphical user interface, (as defined by the IEEE 1295 specification. Motif is the leading user interface for the UNIX based operating system.
The X Window System is the de facto standard graphical engine for the UNIX* and Linux* operating systems.
How are these two things, Motif and X Window related to Java AWT and Swing? Are they competing technologies? Are AWT and Swing built on top of them?
Window-management functions -- drawing a frame around a window, hiding windows, letting the user drag and resize a window -- are handled by yet another user-space program, an "X window manager." There are literally dozens of different window managers to choose from, and some of them differ very radically from one another. The user gets to pick one.
Anyway, the X server handles very, very low-level commands like "draw a pixel" and "draw a line" and "paint a rectangle." To use X comfortably, you usually use a toolkit of some kind that builds on top of the X service. Motif is one such toolkit. It implements buttons and scrollbars and text widgets, all in terms of the X server's facilities. It used to be the defacto standard; nowadays you don't see it very much. Now there are other, better toolkits. You may have head of GTK or Qt, for example, both very common in the Linux world (note that you can have multiple toolkits in use at once.)
The AWT has to be implemented in terms of native widgets, so it is, indeed, implemented in terms of an X toolkit, invariably Motif. That's why AWT is so god-awful ugly on UNIX systems!
Swing, which doesn't use a toolkit, just builds on java.awt.Graphics2D, which can be implemented in terms of direct calls to the X API.
I don�t need to know anymore, but I am curious. Is there only one X Windows server program for all X clients and Java VMs?
[ January 29, 2004: Message edited by: Marlene Miller ]
Because multiple programs all talk to the same X server, it can be used as a kind of simple interprocess communication. So, for example, the X protocol includes a clipboard, and there's a standard drag-and-drop extension (actually, unfortunately, there are several of these, incompatible with one another.)