BuddySoft Painter Capstone Project Buddy Landry December 15, 2006.

11
BuddySoft Painter BuddySoft Painter Capstone Project Capstone Project Buddy Landry Buddy Landry December 15, 2006 December 15, 2006

Transcript of BuddySoft Painter Capstone Project Buddy Landry December 15, 2006.

Page 1: BuddySoft Painter Capstone Project Buddy Landry December 15, 2006.

BuddySoft Painter BuddySoft Painter Capstone ProjectCapstone Project

BuddySoft Painter BuddySoft Painter Capstone ProjectCapstone Project

Buddy LandryBuddy LandryDecember 15, 2006December 15, 2006

Page 2: BuddySoft Painter Capstone Project Buddy Landry December 15, 2006.

Project Description• I was inspired to create my own version

of MS Paint after learning about Mouse Listeners and GUI Components in this class.

• I decided to see how close to the original program I could get by using Java to code it but decided to create a couple of my own unique tools to add to it.

Page 3: BuddySoft Painter Capstone Project Buddy Landry December 15, 2006.

GUI Components• I used JButtons to select from

multiple tools and Combo Boxes to select foreground and background colors as well as to select the tool size.

• JMenus were used for the top menu bar with dialog boxes.

Page 4: BuddySoft Painter Capstone Project Buddy Landry December 15, 2006.

GUI Layout• I used a BorderLayout with a

GridLayout to organize my toolbar, menubar and JPanel to draw on.

• Tooltips and Mnemonics were used to see the tool description and to view the alternate tool selection (alt+key).

• Dialog Boxes were used to provide the user information in the program.

Page 5: BuddySoft Painter Capstone Project Buddy Landry December 15, 2006.

MouseListener and MouseMotionListener

• The dragged method was used to provide the paint on the JPanel. They enabled the graphic context to function on the panel to display the user drawing input.

Page 6: BuddySoft Painter Capstone Project Buddy Landry December 15, 2006.

ButtonListener (ActionListener)

• In order for the user to select different tools, I set an integer value for each tool and switched it when the user clicked a different button to change the event source.

• For the comboboxes I changed the SelectedIndex to change color and sizes.

Page 7: BuddySoft Painter Capstone Project Buddy Landry December 15, 2006.

Tool Bar• List of Tools• 1. Pencil 7. Open Oval• 2. Feather 8. Open Rectangle• 3. Blotch 9. Closed Oval• 4. Brush 10. Closed Rectangle• 5. Spray Can• 6. Cobwebs

Page 8: BuddySoft Painter Capstone Project Buddy Landry December 15, 2006.

Outcomes• I was able to create a good equivalent to

MS Paint with tools, buttons, drawing, color selection, help dialog boxes, a open dialog box, and an exit menu button.

• I lacked selection, cut, copy, and paste features, and a save as dialog box. I wasn’t sure about I/O streams to create it.

Page 9: BuddySoft Painter Capstone Project Buddy Landry December 15, 2006.

Lessons Learned

• The Sun Microsystems website was a terrific resource providing vast information about GUI Components. It had components I have never heard of before.

• The API is a programmers best friend. It is equivalent to the Actionscript library and Dreamweaver O’Reilly code libraries.

• I learned the vast possibilities Java provides. The object oriented aspect of Java makes it flexible to create applications, animations, games.

Page 10: BuddySoft Painter Capstone Project Buddy Landry December 15, 2006.

Lessons Learned• Class files allow a programmer to create

unique applications by inheriting what they need rather than always creating something from scratch.

• The object oriented concepts exist in multiple languages but are typed differently. Java is strongly typed but other languages still declare data types but just in different ways.

• Programming becomes formulaic after awhile. Practice goes a long way because instantiation becomes routine creating many components with the same technique.

Page 11: BuddySoft Painter Capstone Project Buddy Landry December 15, 2006.

Other Goals• A Java Word Processor.• A Java Audio Player/Equalizer.• Go into Java Advanced Topics such

as JDBC and Networking.• Applets are neat. The applet life

cycle is a little bit different than applications.