20-06apr05GUIs - 5 A p r il 2 0 0 7 G U IS G r a p h ic a l...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
1 1 5 April 2007 GUIS —Graphical User Interfaces Their mouse had a mean time between failure of … a week, at which time it would jam up irreparably, or . .. It would jam up on the table-- . .. It had a flimsy cord whose wires would break. Steve Jobs said ". .. Xerox says it can't be built for less than $400, but I want a $10 mouse that will never fail and can be mass-produced, because it's going to be the primary interface of the computer of the future." ... Dean Hovey . .. came back and said, "I've got some good news and some bad news. The good news is, we've got a new project with Apple. The bad news is, I told Steve we'd design him a mouse for ten bucks." ... A year … later . .. we had a design, filed a patent, and were granted a patent, on the electro-mechanical-optical mouse of today, which is still the reference design for PC mice. . .. and . .. we ended up . .. [making] the mouse as invisible to people as it is today. Read Chap. 17 of the text. The ProgramLive CD is a better way to learn about GUIs. See the CD for examples of code. Interview with Steve Sachs on Apple and the Mouse in 1979 and the first computer with a GUI, the Apple Lisa (about $9,999 in about 1982). http://library.stanford.edu/mac/primary/interviews/sachs/trans.html 2 JFrame’s content pane South East West Center North Container cp= getContentPane(); JButton jb= new JButton(“Click here”); JButton jl= new JLabel( “label 2”); cp.add(jb, BorderLayout.EAST); cp.add(jl, BorderLayout.WEST); pack(); setVisible( true ); Layout manager : An instance controls the placement of components. JFrame layout manager default : BorderLayout. BorderLayout layout manager: Can place 5 components: 3 Putting components in a JFrame import java.awt.*; import javax.swing.*; /** Demonstrate placement of components in a JFrame. Use BorderLayout. It places five components in the five possible areas:
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 03/03/2012 for the course CS 100J taught by Professor Davidgries during the Spring '07 term at Cornell.

Page1 / 2

20-06apr05GUIs - 5 A p r il 2 0 0 7 G U IS G r a p h ic a l...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online