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