User Interface with Java Tutorial 1 - PowerPoint PPT Presentation

1 / 17
About This Presentation
Title:

User Interface with Java Tutorial 1

Description:

Borland JBuilder is the leading cross-platform ... More at Borland's document FTP ... ftp://ftpc.borland.com/pub/jbuilder/techpubs/jbuilder9/ 7. Work on ... – PowerPoint PPT presentation

Number of Views:66
Avg rating:3.0/5.0
Slides: 18
Provided by: robert306
Category:

less

Transcript and Presenter's Notes

Title: User Interface with Java Tutorial 1


1
User Interface with JavaTutorial 1
  • CSPP 51041
  • Summer 2003
  • July 8th

2
Todays topics
  • JBuilder
  • General Java development
  • GUI design
  • Timers
  • Poseidon for UML

3
JBuilder
  • Borland JBuilder is the leading cross-platform
    environment for building industrial-strength
    enterprise Java applications.
  • http//www.borland.com/jbuilder/

4
Myself
  • Name Xuehai Zhang
  • Office Ryerson 177, cubicle 3
  • Email hai_at_cs.uchicago.edu
  • Phone (773)834-4416
  • TA hours Tues, 4-5PM

5
Access JBuilder
  • Working directly on depts Linux clusters
  • Using JBuilder 6 pre-installed in shared file
    system
  • /opt/jbuilder/JBuilder6/bin/jbuilder
  • Working from your own computer
  • Linux users
  • Can remotely use depts JBuilder 6
  • The rest (including Linux users)
  • Need to download and Install JBuilder 8 or 9
  • Key
  • http//www.borland.com/products/downloads/download
    _jbuilder.html

6
JBuilder Documents
  • My recommendation
  • Introducing JBuilder (introjb.pdf)
  • Building Applications with JBuilder (file
    bajb.pdf)
  • Design User Interface with JBuilder
    (designui.pdf)
  • More at Borlands document FTP sites
  • JBuilder6
  • ftp//ftpc.borland.com/pub/jbuilder/techpubs/jbuil
    der6/
  • JBuilder9
  • ftp//ftpc.borland.com/pub/jbuilder/techpubs/jbuil
    der9/

7
Work on Existing Project
  • ClickCounter project
  • Bank Project

8
New Application Project 1
  • Non-GUI based
  • 3 classes
  • Main class extends from java.lang.Object
  • 1 interface

9
New Application Project 2
  • GUI based
  • 1 class that extends from javax.swing.JFrame

10
Swing Timers
  • Class javax.swing.Timer
  • How it works?
  • Fires one or more action events after a specified
    delay
  • How can it be used?
  • To perform a task once, after a delay
  • To perform a task repeatedly

11
Timer API
  • Constructor
  • Timer(int delay, ActionListener listener)
  • Start Timer
  • void start()
  • Stop Timer
  • void stop()
  • Check status
  • boolean isRunning()
  • Control of action event
  • void setRepeats(boolean flag)
  • More at javax.swing.Timer API document

12
A Timer Example
  • Using a timer to periodically update a component
    that displays progress toward a goal
  • Use case software installation, download, etc.

13
Poseidon for UML
  • A gentleware tool for UML
  • Download page
  • http//www.gentleware.com/products/download.php3
  • Running requirement
  • Java2 Standard Edition (J2SE)
  • Download page http//java.sun.com/j2se/1.4.2/down
    load.html

14
Diagrams
  • Around 10 diagrams provided
  • Diagrams used in this course
  • Use case diagram
  • Why we need this one?
  • State diagram need to associate with a use case
  • State diagram
  • Same concept as STD

15
Use Case Diagram
  • Main ingredients
  • Use cases
  • Actors (roles)
  • Use case diagram for ClickCounter example

16
State Diagram
  • Useful states
  • Initial state
  • Icon
  • Common state
  • Icon
  • Transition
  • Source, target
  • Trigger
  • Same as event in STD
  • Guard
  • Same as precondition in STD
  • Effect
  • Same as consequences in STD

17
State Diagram (contd)
  • More details in ArgoUML manual
  • Web page
  • http//www-ris.det.uvigo.es/avilas/argomanual.pdf
  • State diagram for ClickCounter example
Write a Comment
User Comments (0)
About PowerShow.com