北星学園大学・北星学園大学短期大学部 · web viewdesktopapp.java: the application...

16
2012 年年 年年年年 年年年年 NetBeans 年年 年年年年 library 年年年 library 年年年 Basic IDE Usage package 年年 class 年年 年年年年年年年 class 年年年年 年年年年年年 1

Upload: others

Post on 16-Feb-2021

0 views

Category:

Documents


0 download

TRANSCRIPT

2012年度「専門演習Ⅱ

· 講義要綱

· NetBeans環境

企画生成

libraryを生成

libraryを共有

Basic IDE Usage

package 生成

class 生成

主クラスを実行

classの虫取り

構成子を生成

3.Designing Desktop GUI Application

Creating a Java Desktop Application

Creating a Frame

Creating a Panel

Adding Event Listeners

Connecting my application to a database

Creating a customized icon for my application

Making executable Desktop Applications

GUI Builder that uses Java’s Swing as the default framework:

Create and design complex GUI applications

Drag-and-drop components from a palette component

Design beautiful-looking applications

Previewing the changes before compiling

Possibility to bind data straight from the Database to my component

Creating a Java Desktop Application

【NetBeans IDE 7.1.1】

【NetBeans IDE 7.0.1】

DesktopAboutBox.java

DesktopApp.java: to give some information about the company, developer, and the version of application.

DesktopApp.java: the application launcher. Basically it is used to initialize resources, inject them into the desktop app, and run the GUI class, in our case, DesktopView. This is where the main method exists.

DeskktopView.java: Our main graphical class. This is where we will lay out the components, program those components to react to events, and so on.

From the component palette, it is possible to drag-and-drop the components into Form under GUI Designer.

【Example】

the source for the “Mars Rover Viewer”

Run the main project by clicking on the [Run Main Project].

1