2
Introduction
● Standards
● Resurgence of Swing● Performance & look and feel
● Delivery over the web
● Layout manager & GUI builder
● Development frameworks
3
Agenda
● Goals
● Matisse GUI Builder
● Framework 1: JSR-296 Tooling
● Framework 2: NetBeans Platform
● Conclusion
4
● Show that NetBeans IDE is the one-stop shop for all Swing desktop needs
● Ready out of the box, for applications of all sizes:
● Demo 1: Matisse GUI Builder
● Demo 2: Tooling for JSR-296
● Demo 3: NetBeans Platform
Goals
5
● Goals
● Matisse GUI Builder
● Framework 1: JSR-296 Tooling
● Framework 2: NetBeans Platform
● Conclusion
Agenda
6
GroupLayout
● Part of JDK 6
● Principles:● Independent dimensions
● Hierarchical groups
● Designed to suit GUI Builder needs
7
“Matisse” GUI Builder
● Professional quality layout easily done
● Intuitive drag & drop interface
● Guidelines
● Resize, align, optimal spacing
● Automatically resizes when localized
9
● Goals
● Matisse GUI Builder
● Framework 1: JSR-296 Tooling
● Framework 2: NetBeans Platform
● Conclusion
Agenda
12
import javax.swing.*; public class HelloWorldSwing {
public static void main(String[] args) { JFrame frame = new JFrame("HelloWorldSwing"); final JLabel label = new JLabel("Hello World"); frame.getContentPane().add(label); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.pack(); frame.setVisible(true); } }
Lifecycle Support(On your own)
13
public class MyApp extends SingleFrameApplication {
@Override protected void startup() {JLabel label = new JLabel("Hello World");show(label);
}
public static void main(String[] args) {Application.launch(MyApp.class, args);
}
}
Lifecycle Support(With JSR-296)
14
● Show all the other JSR-296 features in action.
● Integrate Flickr into a Swing desktop application based on JSR-296 using NetBeans tooling.
Demo of JSR-296
15
● Goals
● Matisse GUI Builder
● Framework 1: JSR-296 Tooling
● Framework 2: NetBeans Platform
● Conclusion
Agenda
16
1.Generic Desktop Framework
2.Infrastructural Plumbing
3.Collection of Libraries
4.NetBeans Platform Tooling
NetBeans PlatformWhat is it?
34
Application “Plumbing”
● Windowing/docking system
● Architecture
● Lifecycle management
● Persistence
● Data management
● Consistent look & feel
● Distribution/update mechanism
38
Libraries
● Window System API
● Actions API
● Options Window API
● Many Editor APIs
● Visual Library API
● ...and many more
39
Ways to get started
● Javadoc
● Tutorials
● Samples
● Blog entries
Tip: You can use the NetBeans libraries outside the NetBeans Platform
46
File wizards
● Actions API
● Datasystems API
● Module Install class
● Options Dialog API
● TopComponent class
● Wizard Descriptor class
58
Porting Demo Outline
1. Start with a simple application.
2. Compare what it is to what the NetBeans Platform has.
3. Create a new plugin project.
4. Move the useful parts of our old application to our new plugin.
5. Run it.
59
● Goals
● Matisse GUI Builder
● Framework 1: JSR-296 Tooling
● Framework 2: NetBeans Platform
● Conclusion
Agenda
60
● Ready out of the box, for applications of all sizes:
● Demo 1: Matisse GUI Builder
● Demo 2: Tooling for JSR-296
● Demo 3: NetBeans Platform
● Showed that NetBeans IDE is the one-stop shop for all Swing desktop needs
Conclusion
61
● Matisse GUI Builder
● http://www.netbeans.org/kb/trails/matisse.html
● http://weblogs.java.net/blog/tpavek
● Framework 2: NetBeans Platform
● http://platform.netbeans.org
● http://edu.netbeans.org/courses/nbplatform-certified-training/
● http://nbjfuguesupport.dev.java.net/
● http://netbeans.dzone.com
● http://blogs.sun.com/geertjan
Resources