A tutorial on adding components to your Swing applicatio. This tutorial covers buttons, text areas and BorderLayout. I also show you some useful web pages, including the free WindowBuilderPro from Google and the Swing Visual Guide pages. In the next tutorial I'll show you how to use the highly flexible (if somewhat notorious) GridBagLayout.
After starting the video, click the maximise button to make it fullscreen so you can see the code!
Some useful links:
Window Builder Pro: in spite of the name, this is a FREE Eclipse plugin. The company, or at least its product, was purchased by Google in 2011 and released to the community. The plugin allows you to visually design Swing apps, although it's not always easy to use and doesn't fully insulate you from the underlying complexity in the same way that, say, the C# visual designer does. On the other hand it's a lot better than NetBeans and it allows you to switch between your own code and the visual designer, which is great.
Visual Guide to Swing Components (Oracle seems to have ditched this page, so I've linked to a copy someone's made): with code samples. You'll need this for sure!
Visual Guide to Swing Layouts: you'll need this too.
Screenshot of "finished" app: