Using NetBeans IDE for Desktop Development Geertjan Wielenga http://blogs.sun.com/geertjan
Introduction Standards Resurgence of Swing Performance & look and feel Delivery over the web Layout manager & GUI builder Development frameworks 2
Agenda Goals Matisse GUI Builder Framework 1: JSR-296 Tooling Framework 2: NetBeans Platform Conclusion 3
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 4
Agenda Goals Matisse GUI Builder Framework 1: JSR-296 Tooling Framework 2: NetBeans Platform Conclusion 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
Agenda Goals Matisse GUI Builder Framework 1: JSR-296 Tooling Framework 2: NetBeans Platform Conclusion 9
Motivation for JSR-296 public static void main(string args[]) { // good luck! } 10
JSR-296 Features Lifecycle support Resources Actions Tasks Session state 11
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); } } 12
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); } } 13
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. 14
Agenda Goals Matisse GUI Builder Framework 1: JSR-296 Tooling Framework 2: NetBeans Platform Conclusion 15
NetBeans Platform What is it? 1.Generic Desktop Framework 2.Infrastructural Plumbing 3.Collection of Libraries 4.NetBeans Platform Tooling 16
Generic Desktop Framework 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
Infrastructural Plumbing 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 Architecture Lifecycle management Persistence Data management Consistent look & feel Distribution/update mechanism 34
Demo 35
Collection of Libraries 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: You can use the NetBeans libraries outside the NetBeans Platform 39
NetBeans Platform Tooling 40
Project wizards 41
Outline view 42
NetBeans Platform 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
Dependencies 49
Dependencies 50
Contextual menus 51
Contextual menus 52
Branding 53
Branding 54
Branding 55
Samples 56
Demo: Porting 57
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. 58
Agenda Goals Matisse GUI Builder Framework 1: JSR-296 Tooling Framework 2: NetBeans Platform Conclusion 59
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 60
Resources 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 61
Q/A 62