3156-19 - COMS W3156 Software Engineering Fall 2001...

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

View Full Document Right Arrow Icon
COMS W3156: Software Engineering, Fall 2001 Lecture #19: Databases, CVE’s Janak J Parekh [email protected]
Background image of page 1

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

View Full DocumentRight Arrow Icon
Administrativia Prototype status New schedule adopted Guest lecture on Thursday
Background image of page 2
Next class Guest lecture! It’s my friend, so you have to come After that: Continue discussion on languages Begin pointers C++ Smooth your transition to future semesters Will anyone actually attend next Tues.? I really hope so
Background image of page 3

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

View Full DocumentRight Arrow Icon
Today’s class Finish look at Swing/AWT Recitation! Discuss side-topic of virtual environments in the software engineering world Brief discussion of databases Start C, the language
Background image of page 4
Swing/AWT layout management Need to lay out various components Might use IDE for this, though I don’t BorderLayout, GridLayout, CardLayout, FlowLayout, GridBagLayout Last one pain to do by hand Use JPanels to embed one in another setPreferredSize() Tip: draw out on paper first
Background image of page 5

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

View Full DocumentRight Arrow Icon
Images (I) http://java.sun.com/docs/books/tutorial/uisw Toolkit.getDefaultToolkit().loadImage(…) Create a MediaTracker to wait for image to load Caching images: Java or you? Drawing images: g.drawImage(…) Override paint method in the class
Background image of page 6
Images (II) Image transparency Needed for object-on-tile Use Photoshop or even the GIMP to edit images We linked to a set on the webboard May release our modifications/subset Consider laying out tiles in a GridLayout
Background image of page 7

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

View Full DocumentRight Arrow Icon
Images (III) Alternative image construct: ImageIcon Can embed in a JLabel Useful for buttons and other places where you don’t have access to Graphics context More awkward for actual game board
Background image of page 8
JTables Capable of showing complex data constructs fairly easily Set up a data model behind the table Extend AbstractTableModel Specify the number of rows and columns Specify what data is in each cell Let the JTable do the rest JLists are similar: AbstractListModel Can use Default{Table,List}Model: less useful
Background image of page 9

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

View Full DocumentRight Arrow Icon
Actions JButton addActionListener(new ActionListener()…) Keyboard addKeyListener(new KeyAdapter()…) KeyEvent lets you check for most any key plus modifiers Right-click addMouseListener(new MouseAdapter()…) Uses button masks (1.4 supports wheel!)
Background image of page 10
Miscellany JMenu/JMenuBar for menus JPopupMenu – the name implies it all repaint(), revalidate() JScrollPane to support scrolling of large areas Grid, perhaps? Jsp.getViewport().setViewPosition(…) to force the scrollpane around Ideally, have it “follow” the player Really necessary for JTables http://java.sun.com/docs/books/tutorial/uiswing/component
Background image of page 11

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

View Full DocumentRight Arrow Icon
JDK 1.3.1 demos
Background image of page 12
Image of page 13
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 06/09/2010 for the course COMS W3156 taught by Professor Janakjparekh during the Fall '01 term at Columbia.

Page1 / 37

3156-19 - COMS W3156 Software Engineering Fall 2001...

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

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