The Java Tutorials' Weblog
Knowing the Audience
So my latest assignment is to update the custom painting section of the Swing tutorial. The version that's currently online is really a combination of two separate topics: custom painting, and guidelines for creating custom components. A while back I had posted a proposed outline to this blog about how to update that lesson. It sparked some discussion between myself and the Swing engineering team, resulting in a decision to break the material up even more into two separate lessons.Now, covering a topic like custom painting involves first describing painting in AWT, and then talking about what's changed in Swing. And as you might imagine, there are many excellent articles out there that already do this. The most relevant is Amy Fowler's discussion of painting in AWT and Swing, available at http://java.sun.com/products/jfc/tsc/articles/painting/
As a technical writer, a large part of my job here at Sun is knowing the audience and adjusting my writing style to suit. We've found that the tutorial audience responds very well to complete examples... code that you can see in its entirety, with narrative that gives the reader a specific, guided walk-through of the concepts. This approach is very different from say, writing a whitepaper for JavaOne, or making a clarification to the platform API spec. So how do I go about documenting a subject that has already been covered elsewhere? For me there are two basic steps: 1) learn the facts (AWT and Swing painting subsystems in this case) and 2) create a new presentation from scratch... one that is fresh and not just a copy of something else already out there.
In this case I thought that since custom painting is a "visual" activity, it would make sense to start with something basic (like a Frame or JFrame), then add a drawing surface (Canvas or JPanel etc.), then add some new piece of functionality in each subsequent section. This allows the reader to learn in stages as the application evolves. By the time you finish the lesson, you'll have walked through the concepts that we consider important (by "we" I mean myself AND the Swing engineering team), and hopefully when you're done, you'll think "Wow, that was easy!"
The lesson is currently up for engineering review, but will be posted to the tutorial in early July. Make sure to come back then and check it out!
-- Scott Hommel
Posted at 04:23PM Jun 05, 2007 by The Java Tutorial Team | Comments[4]
Tuesday Jun 05, 2007
Posted by Paul Campbell on June 06, 2007 at 10:22 AM PDT #
Posted by Parag Shah on June 06, 2007 at 10:22 PM PDT #
Oops sorry, my entire post appeared as one paragraph. I guess I should have used html line breaks instead of hitting the enter key for a newline.
--Regards
Parag
Posted by Parag Shah on June 06, 2007 at 10:24 PM PDT #
Posted by Scott Hommel on June 08, 2007 at 11:28 AM PDT #