Monday, 4 October 2010

Click! Eureka! Boom!

Sometimes it just happens like that. Not through any form of higher advantage, but it simply just comes together. In this case I believe it's come together as a result of the journey, of hand cranking attempts to implement function, not quite knowing how it all works, taking it to a serious level of frustration and detail. Then take a break. How many times has it happened for me like that - dive in deep, take a break, come back to it and with the right focus it falls into place.

I can now see end to end how to implement the software I want. I can now say I see how Swing can meet the needs of the gui I want to write, and without going off piste.

It's a recipe involving no layout manager (absolute positioning), JLabels as the the container for text items and with custom painting they can host the notes and other elements too. JPanels can host the lines, or bars or however I want represent them. Swing Drag and Drop with custom dataFlavors will implement most of the drawing needs.

One last little bit, perhaps even the desire to store in XML can be handled to through XMLEncoder although I have to figure out the Beans stuff first before design can seriously get under way.

Think I'll freeze the code I've built so far, and start a new project from scratch using the lessons learned and perhaps even reusing some of the better code from the trials and tribulations to date.

Happy days

No comments:

Post a Comment