Software Engineering I Oct. 28, 2013 Easy to start a GUI application Use Netbeans File -> New Project -> Java Application - Deselect create main class checkbox - Click finish Add a JFrame form - Right click the project name in the project explorer then click New -> JFrame form - Name the GUI class "celsiusConverter" and create a package named "learn" - Click finish Now we have to design our graphical view - Typically this is drawn first, then entered - _Palatte_ contains components offered by the Swing API - We will use a JLabel, JTextField, and a JButton We have a Design/Source Area - Looking at the source view, we have initComponents shaded because they should not be modified We have a property editor to change the properties of the frame We have an inspector with a graphical view of the IDE Start by setting the title in the properties section. Drag the text field, labels, and button into the design area. Finally, add the code corresponding to the buttons. Heuristic Evaluation - Systematically evaluating the system using a heuristic - Heuristic - a well thought out trial and error technique or experimental approach, often based on empirical data - Look for usability defects Could be - Evaluation of paper prototypes, finished system, or intermediate version - Best to ask for independent evaluations Use the following steps - Pick use cases for evaluation focus + Be sure to focus on important ones - For each window, page, or dialog that appears in execution of use cases - Study for: + Violations of usability principles and guidelines + Possible user problems + Other defects - Upon discovering defects + Write them down or enter into an issue tracker + Write down how to solve problem, too - Be sure to communicate other engineers about problems Usability Testing with Users (Observation) - Select users corresponding to important actors + Both beginners and experts + Observe both - Select important use cases for actors to determine tasks for users to follow - Provide instructions for users on paper or on index cards - Arrange evaluation sessions with users + 20 - 30 minute sessions - Explain the purpose of evaluations + You are evaluating the SW not the user! - Could record session (video/audio/screen) + Ensure you see all info needed + Tell the user they will be recorded + Tell them how their recording will be used - May converse with users while performing tasks - Debreif users at the end of the process - Analyze difficulties - Make recommendations Implementing a GUI Java - AWT, SWT, Swing GUI libraries change often Ex: Visual Studio .NET QT Gnome KDE Cocoa/OSX/iOS Many others AWT Items - Component - Button, TextField, TextArea, List, Label, ScrollBar - Container - Frame, Dialog, Panel + Frame - independent window with title and border + Dialog - window opened by another window + Panel - designed to be included within another container - LayoutManager - defines the way Components are laid out in a Container + GridLayout - divides a container into a grid where all Components occupy equal-sized rectangles + BorderLayout - Container divided into North, South, East, and West