xprogrammer is doing 6 things including…

Create the most popular GUI toolkit for Java

1 cheer


Sponsored Links

EXTJS Implementation

www.opencrowd.com/     EXTJS Enterprise Apps in 90 days Schedule a demo with our team

Java browser SDK

www.webrenderer.com/     Leading 100% pure Swing browser SDK HTML 5, CSS, Javscript, SVG, SSL

Create GUI In Java

www.webcrawler.com/     Search multiple engines for create GUI in java

Javascript Gui Toolkit

www.info.com/JavascriptGuiToolkit     Get Info On Javascript Gui Toolkit Access 10 Search Engines At Once.

GUI Design

www.shop411.com/GUI+Design     Find our Lowest Possible Price! GUI Design for Sale

Create GUI In Java

www.wow.com/Create+GUI+In+Java     Search for Create GUI In Java Look Up Quick Results Now!

xprogrammer has written 6 entries about this goal


The basic glyphs at the moment are

  • RectangleGlyph – fill a rectangle with a specific Paint
  • LineGlyph – draw a line with a specific Stroke and Paint
  • TextGlyph – a string with a Font and Paint
  • ImageGlyph – a image.
  • GroupGlyph – a composite which can be used to apply transforms (and possibly effects) to a set of Glyphs

The advantage of this model over previous style sheet based methods is that each Glyph knows its size, position and visual state. Therefore it can exist without requiring a lot of context information. I might take the graphics state (Paint, Stroke, Font) out into a style object to allow sharing and setting of global effects more easily.

Model design

It is really important to me that the model be a plain Java object. It shouldn’t have to implement any special interfaces in order to be part of a GUI.

Controller design

The controller at the moment is looking like 2 parts.

  • Event handling
  • Binding

The main event loop looks like

Event e = getEvent();
dispatchEventToHandlers( e );

View design

I’ve taken another look at the View side of things. My preference is now a display tree modelled after SVG.

Uses Glyph as the metaphor (not sure about this), but it seems lightweight enough.

The Glyph draws its contents and reports damage up to its parent. At the root the damage is collected, then repaints are performed within the damaged region.

Currently developing this on a PIII which is good for spotting performance problems quickly.

The biggest one seems to be with Java image drawing performance.The solution is to make sure that all images are created in a screen compatible BufferedImage format.

From a design point of view I’d like to use immutable objects to represent the bounds, etc but the expense of creating objects when transforming up the Glyph hierarchy might be too much. This really needs to be very fast, as it will be called all the time in the most performance critical part of the code.


Got some great feedback from the guys at eXtreme Wednesday. The main points were that reflection based APIs are really difficult to learn, you can’t use the code completion features of IDEs etc.

They did seem convinced that the concept is good – which was a relief.

The main concept is – “View controls repaint”


I’m finally showing some of the stuff I developed to others tomorrow. Hopefully they will be impressed.

xprogrammer has gotten 1 cheer on this goal.


I want to:
43 Things Login