59
Using NetBeans IDE for Desktop Development Geertjan Wielenga http://blogs.sun.com/geertjan

Using NetBeans IDE for Desktop Developmentedu.netbeans.org/contrib/slides/netbeans-platform/...3 Show that NetBeans IDE is the one-stop shop for all Swing desktop needs Ready out of

  • Upload
    others

  • View
    13

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Using NetBeans IDE for Desktop Developmentedu.netbeans.org/contrib/slides/netbeans-platform/...3 Show that NetBeans IDE is the one-stop shop for all Swing desktop needs Ready out of

Using NetBeans IDEfor

Desktop Development

Geertjan Wielengahttp://blogs.sun.com/geertjan

Page 2: Using NetBeans IDE for Desktop Developmentedu.netbeans.org/contrib/slides/netbeans-platform/...3 Show that NetBeans IDE is the one-stop shop for all Swing desktop needs Ready out of

2

Agenda

● Goals

● Design: Matisse GUI Builder

● Medium Applications: JSR-296 Tooling

● Large Applications: NetBeans Platform

● Conclusion

Page 3: Using NetBeans IDE for Desktop Developmentedu.netbeans.org/contrib/slides/netbeans-platform/...3 Show that NetBeans IDE is the one-stop shop for all Swing desktop needs Ready out of

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

Page 4: Using NetBeans IDE for Desktop Developmentedu.netbeans.org/contrib/slides/netbeans-platform/...3 Show that NetBeans IDE is the one-stop shop for all Swing desktop needs Ready out of

4

● Goals

● Design: Matisse GUI Builder

● Medium Applications: JSR-296 Tooling

● Large Applications: NetBeans Platform

● Conclusion

Agenda

Page 5: Using NetBeans IDE for Desktop Developmentedu.netbeans.org/contrib/slides/netbeans-platform/...3 Show that NetBeans IDE is the one-stop shop for all Swing desktop needs Ready out of

5

GroupLayout

● Part of JDK 6

● Principles:● Independent dimensions

● Hierarchical groups

● Designed to suit GUI Builder needs

Page 6: Using NetBeans IDE for Desktop Developmentedu.netbeans.org/contrib/slides/netbeans-platform/...3 Show that NetBeans IDE is the one-stop shop for all Swing desktop needs Ready out of

6

“Matisse” GUI Builder

● Professional quality layout easily done

● Intuitive drag & drop interface

● Guidelines

● Resize, align, optimal spacing

● Automatically resizes when localized

Page 7: Using NetBeans IDE for Desktop Developmentedu.netbeans.org/contrib/slides/netbeans-platform/...3 Show that NetBeans IDE is the one-stop shop for all Swing desktop needs Ready out of

7

Demo

Page 8: Using NetBeans IDE for Desktop Developmentedu.netbeans.org/contrib/slides/netbeans-platform/...3 Show that NetBeans IDE is the one-stop shop for all Swing desktop needs Ready out of

8

● Goals

● Design: Matisse GUI Builder

● Medium Applications: JSR-296 Tooling

● Large Applications: NetBeans Platform

● Conclusion

Agenda

Page 9: Using NetBeans IDE for Desktop Developmentedu.netbeans.org/contrib/slides/netbeans-platform/...3 Show that NetBeans IDE is the one-stop shop for all Swing desktop needs Ready out of

9

public static void main(String args[]) {

// good luck!

}

Motivation for JSR-296

Page 10: Using NetBeans IDE for Desktop Developmentedu.netbeans.org/contrib/slides/netbeans-platform/...3 Show that NetBeans IDE is the one-stop shop for all Swing desktop needs Ready out of

10

● Lifecycle support

● Resources

● Actions

● Tasks

● Session state

JSR-296 Features

Page 11: Using NetBeans IDE for Desktop Developmentedu.netbeans.org/contrib/slides/netbeans-platform/...3 Show that NetBeans IDE is the one-stop shop for all Swing desktop needs Ready out of

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)

Page 12: Using NetBeans IDE for Desktop Developmentedu.netbeans.org/contrib/slides/netbeans-platform/...3 Show that NetBeans IDE is the one-stop shop for all Swing desktop needs Ready out of

12

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)

Page 13: Using NetBeans IDE for Desktop Developmentedu.netbeans.org/contrib/slides/netbeans-platform/...3 Show that NetBeans IDE is the one-stop shop for all Swing desktop needs Ready out of

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

Page 14: Using NetBeans IDE for Desktop Developmentedu.netbeans.org/contrib/slides/netbeans-platform/...3 Show that NetBeans IDE is the one-stop shop for all Swing desktop needs Ready out of

14

● Goals

● Design: Matisse GUI Builder

● Medium Applications: JSR-296 Tooling

● Large Applications: NetBeans Platform

● Conclusion

Agenda

Page 15: Using NetBeans IDE for Desktop Developmentedu.netbeans.org/contrib/slides/netbeans-platform/...3 Show that NetBeans IDE is the one-stop shop for all Swing desktop needs Ready out of

15

1. Generic Desktop Framework

2.Infrastructural Plumbing

3.Collection of Libraries

4.NetBeans Platform Toolkit

NetBeans PlatformWhat is it?

Page 16: Using NetBeans IDE for Desktop Developmentedu.netbeans.org/contrib/slides/netbeans-platform/...3 Show that NetBeans IDE is the one-stop shop for all Swing desktop needs Ready out of

16

Agenda● Goals

1. Generic Desktop Framework

2. Infrastructural Plumbing

3. Collection of Libraries

4. NetBeans Platform Toolkit

Page 17: Using NetBeans IDE for Desktop Developmentedu.netbeans.org/contrib/slides/netbeans-platform/...3 Show that NetBeans IDE is the one-stop shop for all Swing desktop needs Ready out of

17

NetBeans Platform

Page 18: Using NetBeans IDE for Desktop Developmentedu.netbeans.org/contrib/slides/netbeans-platform/...3 Show that NetBeans IDE is the one-stop shop for all Swing desktop needs Ready out of

18

Nuance Voice-XML

Page 19: Using NetBeans IDE for Desktop Developmentedu.netbeans.org/contrib/slides/netbeans-platform/...3 Show that NetBeans IDE is the one-stop shop for all Swing desktop needs Ready out of

19

Fiorano Studio

Page 20: Using NetBeans IDE for Desktop Developmentedu.netbeans.org/contrib/slides/netbeans-platform/...3 Show that NetBeans IDE is the one-stop shop for all Swing desktop needs Ready out of

20

Nokia: Mobile Network

Page 21: Using NetBeans IDE for Desktop Developmentedu.netbeans.org/contrib/slides/netbeans-platform/...3 Show that NetBeans IDE is the one-stop shop for all Swing desktop needs Ready out of

21

Sketsa SVG Editor

Page 22: Using NetBeans IDE for Desktop Developmentedu.netbeans.org/contrib/slides/netbeans-platform/...3 Show that NetBeans IDE is the one-stop shop for all Swing desktop needs Ready out of

22

VisualVM

Page 23: Using NetBeans IDE for Desktop Developmentedu.netbeans.org/contrib/slides/netbeans-platform/...3 Show that NetBeans IDE is the one-stop shop for all Swing desktop needs Ready out of

23

AIOTrade

Page 24: Using NetBeans IDE for Desktop Developmentedu.netbeans.org/contrib/slides/netbeans-platform/...3 Show that NetBeans IDE is the one-stop shop for all Swing desktop needs Ready out of

24

NetBeans IDE

Page 25: Using NetBeans IDE for Desktop Developmentedu.netbeans.org/contrib/slides/netbeans-platform/...3 Show that NetBeans IDE is the one-stop shop for all Swing desktop needs Ready out of

25

JCae-CAD

Page 26: Using NetBeans IDE for Desktop Developmentedu.netbeans.org/contrib/slides/netbeans-platform/...3 Show that NetBeans IDE is the one-stop shop for all Swing desktop needs Ready out of

26

MC4J JMX Console

Page 27: Using NetBeans IDE for Desktop Developmentedu.netbeans.org/contrib/slides/netbeans-platform/...3 Show that NetBeans IDE is the one-stop shop for all Swing desktop needs Ready out of

27

JFugue Music Notepad

Page 28: Using NetBeans IDE for Desktop Developmentedu.netbeans.org/contrib/slides/netbeans-platform/...3 Show that NetBeans IDE is the one-stop shop for all Swing desktop needs Ready out of

28

StudioSL: Oil Flow

Page 29: Using NetBeans IDE for Desktop Developmentedu.netbeans.org/contrib/slides/netbeans-platform/...3 Show that NetBeans IDE is the one-stop shop for all Swing desktop needs Ready out of

29

Agenda● Goals

1. Generic Desktop Framework

2. Infrastructural Plumbing

3. Collection of Libraries

4. NetBeans Platform Toolkit

Page 30: Using NetBeans IDE for Desktop Developmentedu.netbeans.org/contrib/slides/netbeans-platform/...3 Show that NetBeans IDE is the one-stop shop for all Swing desktop needs Ready out of

30

Maybe this is your code:

Page 31: Using NetBeans IDE for Desktop Developmentedu.netbeans.org/contrib/slides/netbeans-platform/...3 Show that NetBeans IDE is the one-stop shop for all Swing desktop needs Ready out of

31

Maybe this is you:

Page 32: Using NetBeans IDE for Desktop Developmentedu.netbeans.org/contrib/slides/netbeans-platform/...3 Show that NetBeans IDE is the one-stop shop for all Swing desktop needs Ready out of

32

This should be you...

domain expertknowledge

Page 33: Using NetBeans IDE for Desktop Developmentedu.netbeans.org/contrib/slides/netbeans-platform/...3 Show that NetBeans IDE is the one-stop shop for all Swing desktop needs Ready out of

33

Application “Plumbing”

● Windowing/docking system

● Archictecture

● Lifecycle management

● Persistence

● Data management

● Consistent look & feel

● Distribution/update mechanism

Page 34: Using NetBeans IDE for Desktop Developmentedu.netbeans.org/contrib/slides/netbeans-platform/...3 Show that NetBeans IDE is the one-stop shop for all Swing desktop needs Ready out of

34

Demo

Page 35: Using NetBeans IDE for Desktop Developmentedu.netbeans.org/contrib/slides/netbeans-platform/...3 Show that NetBeans IDE is the one-stop shop for all Swing desktop needs Ready out of

35

Agenda● Goals

1. Generic Desktop Framework

2. Infrastructural Plumbing

3. Collection of Libraries

4. NetBeans Platform Toolkit

Page 36: Using NetBeans IDE for Desktop Developmentedu.netbeans.org/contrib/slides/netbeans-platform/...3 Show that NetBeans IDE is the one-stop shop for all Swing desktop needs Ready out of

36

Javadoc

Page 37: Using NetBeans IDE for Desktop Developmentedu.netbeans.org/contrib/slides/netbeans-platform/...3 Show that NetBeans IDE is the one-stop shop for all Swing desktop needs Ready out of

37

Libraries

● Window System API

● Actions API

● Options Window API

● Many Editor APIs

● Visual Library API

● ...and many more

Page 38: Using NetBeans IDE for Desktop Developmentedu.netbeans.org/contrib/slides/netbeans-platform/...3 Show that NetBeans IDE is the one-stop shop for all Swing desktop needs Ready out of

38

Ways to get started

● Javadoc

● Tutorials

● Samples

● Blog entries

Tip: Use them outside the NetBeans Platform

Page 39: Using NetBeans IDE for Desktop Developmentedu.netbeans.org/contrib/slides/netbeans-platform/...3 Show that NetBeans IDE is the one-stop shop for all Swing desktop needs Ready out of

39

Agenda● Goals

1. Generic Desktop Framework

2. Infrastructural Plumbing

3. Collection of Libraries

4. NetBeans Platform Toolkit

Page 40: Using NetBeans IDE for Desktop Developmentedu.netbeans.org/contrib/slides/netbeans-platform/...3 Show that NetBeans IDE is the one-stop shop for all Swing desktop needs Ready out of

40

Project wizards

Page 41: Using NetBeans IDE for Desktop Developmentedu.netbeans.org/contrib/slides/netbeans-platform/...3 Show that NetBeans IDE is the one-stop shop for all Swing desktop needs Ready out of

41

NetBeans Platform

Page 42: Using NetBeans IDE for Desktop Developmentedu.netbeans.org/contrib/slides/netbeans-platform/...3 Show that NetBeans IDE is the one-stop shop for all Swing desktop needs Ready out of

42

Outline view

Page 43: Using NetBeans IDE for Desktop Developmentedu.netbeans.org/contrib/slides/netbeans-platform/...3 Show that NetBeans IDE is the one-stop shop for all Swing desktop needs Ready out of

43

Project wizards

Page 44: Using NetBeans IDE for Desktop Developmentedu.netbeans.org/contrib/slides/netbeans-platform/...3 Show that NetBeans IDE is the one-stop shop for all Swing desktop needs Ready out of

44

File wizards

Page 45: Using NetBeans IDE for Desktop Developmentedu.netbeans.org/contrib/slides/netbeans-platform/...3 Show that NetBeans IDE is the one-stop shop for all Swing desktop needs Ready out of

45

File wizards

● Actions API

● Datasystems API

● Module Install class

● Options Dialog API

● TopComponent class

● Wizard Descriptor class

Page 46: Using NetBeans IDE for Desktop Developmentedu.netbeans.org/contrib/slides/netbeans-platform/...3 Show that NetBeans IDE is the one-stop shop for all Swing desktop needs Ready out of

46

Configuration

Page 47: Using NetBeans IDE for Desktop Developmentedu.netbeans.org/contrib/slides/netbeans-platform/...3 Show that NetBeans IDE is the one-stop shop for all Swing desktop needs Ready out of

47

Editor

Page 48: Using NetBeans IDE for Desktop Developmentedu.netbeans.org/contrib/slides/netbeans-platform/...3 Show that NetBeans IDE is the one-stop shop for all Swing desktop needs Ready out of

48

While developing...

...enhance the IDE

Page 49: Using NetBeans IDE for Desktop Developmentedu.netbeans.org/contrib/slides/netbeans-platform/...3 Show that NetBeans IDE is the one-stop shop for all Swing desktop needs Ready out of

49

Dependencies

Page 50: Using NetBeans IDE for Desktop Developmentedu.netbeans.org/contrib/slides/netbeans-platform/...3 Show that NetBeans IDE is the one-stop shop for all Swing desktop needs Ready out of

50

Dependencies

Page 51: Using NetBeans IDE for Desktop Developmentedu.netbeans.org/contrib/slides/netbeans-platform/...3 Show that NetBeans IDE is the one-stop shop for all Swing desktop needs Ready out of

51

Contextual menus

Page 52: Using NetBeans IDE for Desktop Developmentedu.netbeans.org/contrib/slides/netbeans-platform/...3 Show that NetBeans IDE is the one-stop shop for all Swing desktop needs Ready out of

52

Contextual menus

Page 53: Using NetBeans IDE for Desktop Developmentedu.netbeans.org/contrib/slides/netbeans-platform/...3 Show that NetBeans IDE is the one-stop shop for all Swing desktop needs Ready out of

53

Samples

Page 54: Using NetBeans IDE for Desktop Developmentedu.netbeans.org/contrib/slides/netbeans-platform/...3 Show that NetBeans IDE is the one-stop shop for all Swing desktop needs Ready out of

54

Demo: Porting

Page 55: Using NetBeans IDE for Desktop Developmentedu.netbeans.org/contrib/slides/netbeans-platform/...3 Show that NetBeans IDE is the one-stop shop for all Swing desktop needs Ready out of

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.

Page 56: Using NetBeans IDE for Desktop Developmentedu.netbeans.org/contrib/slides/netbeans-platform/...3 Show that NetBeans IDE is the one-stop shop for all Swing desktop needs Ready out of

56

Porting Guide

http://platform.netbeans.org/tutorials/60/nbm-porting-basic.html

Page 57: Using NetBeans IDE for Desktop Developmentedu.netbeans.org/contrib/slides/netbeans-platform/...3 Show that NetBeans IDE is the one-stop shop for all Swing desktop needs Ready out of

57

● Goals

● Design: Matisse GUI Builder

● Medium Applications: JSR-296 Tooling

● Large Applications: NetBeans Platform

● Conclusion

Agenda

Page 58: Using NetBeans IDE for Desktop Developmentedu.netbeans.org/contrib/slides/netbeans-platform/...3 Show that NetBeans IDE is the one-stop shop for all Swing desktop needs Ready out of

58

● http://weblogs.java.net/blog/tpavek

Resources

Page 59: Using NetBeans IDE for Desktop Developmentedu.netbeans.org/contrib/slides/netbeans-platform/...3 Show that NetBeans IDE is the one-stop shop for all Swing desktop needs Ready out of

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