Using NetBeans IDE for Desktop Development Geertjan Wielenga
2 Agenda ● Goals ● Design: Matisse GUI Builder ● Medium Applications: JSR-296 Tooling ● Large Applications: NetBeans Platform ● Conclusion
3 ● 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
4 ● Goals ● Design: Matisse GUI Builder ● Medium Applications: JSR-296 Tooling ● Large Applications: NetBeans Platform ● Conclusion Agenda
5 GroupLayout ● Part of JDK 6 ● Principles: ● Independent dimensions ● Hierarchical groups ● Designed to suit GUI Builder needs
6 “Matisse” GUI Builder ● Professional quality layout easily done ● Intuitive drag & drop interface ● Guidelines ● Resize, align, optimal spacing ● Automatically resizes when localized
7 Demo
8 ● Goals ● Design: Matisse GUI Builder ● Medium Applications: JSR-296 Tooling ● Large Applications: NetBeans Platform ● Conclusion Agenda
9 public static void main(String args[]) { // good luck! } Motivation for JSR- 296
10 ● Lifecycle support ● Resources ● Actions ● Tasks ● Session state JSR-296 Features
11 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)
12 public class MyApp extends SingleFrameApplication 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)
13 ● 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
14 ● Goals ● Design: Matisse GUI Builder ● Medium Applications: JSR-296 Tooling ● Large Applications: NetBeans Platform ● Conclusion Agenda
15 1.Generic Desktop Framework 2.Infrastructural Plumbing 3.Collection of Libraries 4.NetBeans Platform Toolkit NetBeans Platform What is it?
16 Agenda ● Goals 1.Generic Desktop Framework 2.Infrastructural Plumbing 3.Collection of Libraries 4.NetBeans Platform Toolkit
17 NetBeans Platform
18 Nuance Voice-XML
19 Fiorano Studio
20 Nokia: Mobile Network
21 Sketsa SVG Editor
22 VisualVM
23 AIOTrade
24 NetBeans IDE
25 JCae-CAD
26 MC4J JMX Console
27 JFugue Music Notepad
28 StudioSL: Oil Flow
29 Agenda ● Goals 1.Generic Desktop Framework 2.Infrastructural Plumbing 3.Collection of Libraries 4.NetBeans Platform Toolkit
30 Maybe this is your code:
31 Maybe this is you:
32 This should be you... domain expert knowledge
33 Application “Plumbing” ● Windowing/docking system ● Archictecture ● Lifecycle management ● Persistence ● Data management ● Consistent look & feel ● Distribution/update mechanism
34 Demo
35 Agenda ● Goals 1.Generic Desktop Framework 2.Infrastructural Plumbing 3.Collection of Libraries 4.NetBeans Platform Toolkit
36 Javadoc
37 Libraries ● Window System API ● Actions API ● Options Window API ● Many Editor APIs ● Visual Library API ●...and many more
38 Ways to get started ● Javadoc ● Tutorials ● Samples ● Blog entries Tip: Use them outside the NetBeans Platform
39 Agenda ● Goals 1.Generic Desktop Framework 2.Infrastructural Plumbing 3.Collection of Libraries 4.NetBeans Platform Toolkit
40 Project wizards
41 NetBeans Platform
42 Outline view
43 Project wizards
44 File wizards
45 File wizards ● Actions API ● Datasystems API ● Module Install class ● Options Dialog API ● TopComponent class ● Wizard Descriptor class
46 Configuration
47 Editor
48 While developing......enhance the IDE
49 Dependencies
50 Dependencies
51 Contextual menus
52 Contextual menus
53 Samples
54 Demo: Porting
55 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.
56 Porting Guide nbm-porting-basic.html
57 ● Goals ● Design: Matisse GUI Builder ● Medium Applications: JSR-296 Tooling ● Large Applications: NetBeans Platform ● Conclusion Agenda
58 ● Resources
59 ● 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