1 / 9

Advanced Java Programming

Informatics Engineering – University of Brawijaya. Advanced Java Programming. Swing part-one. Eriq Muhammad Adams J e riq.adams@ub.ac.id. Agenda. Overview Netbeans Matisse GUI Builder Internationalization SwingWorker. Overview.

field
Download Presentation

Advanced Java Programming

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Informatics Engineering – University of Brawijaya Advanced Java Programming Swing part-one Eriq Muhammad Adams J eriq.adams@ub.ac.id

  2. Agenda • Overview • Netbeans Matisse GUI Builder • Internationalization • SwingWorker

  3. Overview • 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.

  4. Overview (cont.) • Swing is built on top of AWT. • Swing uses MVC architecture. • All swing components conform to JavaBeans specification. • Support event handling and dispatching.

  5. Overview (cont.) • Swing Component’s Hierarchy :

  6. Overview (cont.) • 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 NetbeansMattise GUI Builder. • You can extends any swing components to create new components, but please check free components out there before to save time.

  7. Netbeans Matisse GUI Builder • 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/gui-image-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 GridBagCustomizer http://netbeans.org/kb/docs/java/gbcustomizer-basic.html • Designing an Advanced Java Form Using the GridBagCustomizer 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

  8. Internationalization • 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

  9. SwingWorker • 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

More Related