Overview (cont.)

Download Report

Transcript Overview (cont.)

Informatics Engineering – University of Brawijaya
*
Swing part-one
Eriq Muhammad Adams J
[email protected]
* Overview
* Netbeans Matisse GUI Builder
* Internationalization
* SwingWorker
* JFC (Java Foundation Class) consist of AWT, Swing, Java 2D,
Drag n Drop, Accessibility.
* The Abstract Window Toolkit (AWT) is the part of Java
designed for creating user interfaces and painting graphics
and images.
* Swing is built on top of AWT.
* Swing uses MVC architecture.
* All swing components conform to JavaBeans specification.
* Support event handling and dispatching.
* Swing Component’s Hierarchy :
* By default all AWT and Swing-based applications start off with
two threads. One is the main application thread which handles
execution of the main() method. The other, referred to as the
event-dispatching thread, is responsible for handling events,
painting, and layout.
* If you have time-consuming process in GUI application, you
have to start your process in another thread in order not looks
laggy. SwingWorker will help you to do that.
* For rapid n easy development please use Netbeans Mattise GUI
Builder.
* You can extends any swing components to create new
components, but please check free components out there
before to save time.
* Please check these tutorials to learn about matisse.
 GUI Building in NetBeans IDE Tutorial
http://netbeans.org/kb/docs/java/quickstart-gui.html
 NetBeans IDE GUI Builder Visual Feedback Legend
http://netbeans.org/kb/docs/java/quickstart-gui-legend.html
 Handling Images in A GUI Application http://netbeans.org/kb/docs/java/guiimage-display.html
 Adding a FileChooser to a GUI Application
http://netbeans.org/kb/docs/java/gui-filechooser.html
 Creating a Graphical Client for Twitter
http://netbeans.org/kb/docs/websvc/twitter-swing.html
 Designing a Basic Java Form Using the GridBag Customizer
http://netbeans.org/kb/docs/java/gbcustomizer-basic.html
 Designing an Advanced Java Form Using the GridBag Customizer
http://netbeans.org/kb/docs/java/gbcustomizer-advanced.html
 Designing a Swing GUI in NetBeans IDE Screencast
http://netbeans.org/kb/docs/java/gui-builder-screencast.html
* If you want your application support several languages, you
have to add internationalization.
* Internationalization commonly be called i8n.
* Please check tutorial about i8n with Matisse at
http://netbeans.org/kb/docs/java/gui-automatic-i18n.html
* SwingWorker used when you have background process / task
that time consuming process.
Create
SwingWorker
Procedure for
background
task
Procedure if
background
task completed
Start
background
task