user interface designgorskicompsci.ca/ics3u/unit4/ppt8_user_interface_design2.pdfuser interface...

30
User Interface Design

Upload: others

Post on 17-Dec-2020

8 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: User Interface Designgorskicompsci.ca/ICS3U/Unit4/ppt8_User_Interface_Design2.pdfUser Interface Design Author Gorski, Amanda Created Date 12/10/2020 5:07:44 PM

User Interface Design

Page 2: User Interface Designgorskicompsci.ca/ICS3U/Unit4/ppt8_User_Interface_Design2.pdfUser Interface Design Author Gorski, Amanda Created Date 12/10/2020 5:07:44 PM
Page 3: User Interface Designgorskicompsci.ca/ICS3U/Unit4/ppt8_User_Interface_Design2.pdfUser Interface Design Author Gorski, Amanda Created Date 12/10/2020 5:07:44 PM

Red

Green Blue

RGB Colours

Magenta

Cyan

Yellow

Page 4: User Interface Designgorskicompsci.ca/ICS3U/Unit4/ppt8_User_Interface_Design2.pdfUser Interface Design Author Gorski, Amanda Created Date 12/10/2020 5:07:44 PM

Red

Green Blue

RGB Colours

Magenta

Cyan

Yellow R + G = YG + B = CR + B = M

Page 5: User Interface Designgorskicompsci.ca/ICS3U/Unit4/ppt8_User_Interface_Design2.pdfUser Interface Design Author Gorski, Amanda Created Date 12/10/2020 5:07:44 PM
Page 6: User Interface Designgorskicompsci.ca/ICS3U/Unit4/ppt8_User_Interface_Design2.pdfUser Interface Design Author Gorski, Amanda Created Date 12/10/2020 5:07:44 PM
Page 7: User Interface Designgorskicompsci.ca/ICS3U/Unit4/ppt8_User_Interface_Design2.pdfUser Interface Design Author Gorski, Amanda Created Date 12/10/2020 5:07:44 PM
Page 8: User Interface Designgorskicompsci.ca/ICS3U/Unit4/ppt8_User_Interface_Design2.pdfUser Interface Design Author Gorski, Amanda Created Date 12/10/2020 5:07:44 PM
Page 9: User Interface Designgorskicompsci.ca/ICS3U/Unit4/ppt8_User_Interface_Design2.pdfUser Interface Design Author Gorski, Amanda Created Date 12/10/2020 5:07:44 PM

How do you make custom colours?

Page 10: User Interface Designgorskicompsci.ca/ICS3U/Unit4/ppt8_User_Interface_Design2.pdfUser Interface Design Author Gorski, Amanda Created Date 12/10/2020 5:07:44 PM

255 0 0

0 255 0

0 0 255

How do you make custom colours?

Page 11: User Interface Designgorskicompsci.ca/ICS3U/Unit4/ppt8_User_Interface_Design2.pdfUser Interface Design Author Gorski, Amanda Created Date 12/10/2020 5:07:44 PM

255 0 0

255 255 0

0 255 0

0 0 255

How do you make custom colours?

Page 12: User Interface Designgorskicompsci.ca/ICS3U/Unit4/ppt8_User_Interface_Design2.pdfUser Interface Design Author Gorski, Amanda Created Date 12/10/2020 5:07:44 PM

255 0 0

255 255 0

0 255 0

0 255 255

0 0 255

How do you make custom colours?

Page 13: User Interface Designgorskicompsci.ca/ICS3U/Unit4/ppt8_User_Interface_Design2.pdfUser Interface Design Author Gorski, Amanda Created Date 12/10/2020 5:07:44 PM

255 0 0

255 255 0

0 255 0

0 255 255

0 0 255

255 0 255

How do you make custom colours?

Page 14: User Interface Designgorskicompsci.ca/ICS3U/Unit4/ppt8_User_Interface_Design2.pdfUser Interface Design Author Gorski, Amanda Created Date 12/10/2020 5:07:44 PM

255 0 0

255 255 0

0 255 0

0 255 255

0 0 255

255 0 255

0 0 0

255 255 255

How do you make custom colours?

Page 15: User Interface Designgorskicompsci.ca/ICS3U/Unit4/ppt8_User_Interface_Design2.pdfUser Interface Design Author Gorski, Amanda Created Date 12/10/2020 5:07:44 PM

Provide clear titles.Clear instructions

Page 16: User Interface Designgorskicompsci.ca/ICS3U/Unit4/ppt8_User_Interface_Design2.pdfUser Interface Design Author Gorski, Amanda Created Date 12/10/2020 5:07:44 PM

Put prompts in front of JTextfields. Clear instructions

Page 17: User Interface Designgorskicompsci.ca/ICS3U/Unit4/ppt8_User_Interface_Design2.pdfUser Interface Design Author Gorski, Amanda Created Date 12/10/2020 5:07:44 PM

Provide instructions in JLabels.Clear instructions

Page 18: User Interface Designgorskicompsci.ca/ICS3U/Unit4/ppt8_User_Interface_Design2.pdfUser Interface Design Author Gorski, Amanda Created Date 12/10/2020 5:07:44 PM

Visually Appealing Use colour and pictures.

Page 19: User Interface Designgorskicompsci.ca/ICS3U/Unit4/ppt8_User_Interface_Design2.pdfUser Interface Design Author Gorski, Amanda Created Date 12/10/2020 5:07:44 PM

Resize the applet to one that displays the content well.Visually

Appealing

Page 20: User Interface Designgorskicompsci.ca/ICS3U/Unit4/ppt8_User_Interface_Design2.pdfUser Interface Design Author Gorski, Amanda Created Date 12/10/2020 5:07:44 PM

Similar widgets should be the same size.

Visually Appealing

Page 21: User Interface Designgorskicompsci.ca/ICS3U/Unit4/ppt8_User_Interface_Design2.pdfUser Interface Design Author Gorski, Amanda Created Date 12/10/2020 5:07:44 PM

Widget Arrangement

Widgets appear in the order the user will need them.

Page 22: User Interface Designgorskicompsci.ca/ICS3U/Unit4/ppt8_User_Interface_Design2.pdfUser Interface Design Author Gorski, Amanda Created Date 12/10/2020 5:07:44 PM

Code if statements to handle invalid data entry.

if (e.getActionCommand ().equals ("check")){

String choice = ans.getText ();if (choice.equalsIgnoreCase ("A"))

showStatus ("No, cactus.");else if (choice.equalsIgnoreCase ("B"))

showStatus ("No, rocks.");else if (choice.equalsIgnoreCase ("C"))

showStatus ("Correct! Juicy ants!");else if (choice.equalsIgnoreCase ("D"))

showStatus ("No, grass.");else

showStatus ("Try a, b, c or d.");}

Error handling

Page 23: User Interface Designgorskicompsci.ca/ICS3U/Unit4/ppt8_User_Interface_Design2.pdfUser Interface Design Author Gorski, Amanda Created Date 12/10/2020 5:07:44 PM

Have a reset/undo button

Error handling

Page 24: User Interface Designgorskicompsci.ca/ICS3U/Unit4/ppt8_User_Interface_Design2.pdfUser Interface Design Author Gorski, Amanda Created Date 12/10/2020 5:07:44 PM

if (e.getActionCommand ().equals ("check")){

String choice = ans.getText ();if (choice.equalsIgnoreCase ("A"))

showStatus ("No, cactus.");else if (choice.equalsIgnoreCase ("B"))

showStatus ("No, rocks.");else if (choice.equalsIgnoreCase ("C"))

showStatus ("Correct! Juicy ants!");else if (choice.equalsIgnoreCase ("D"))

showStatus ("No, grass.");else

showStatus ("Try a, b, c or d.");}

if (e.getActionCommand ().equals ("A"))showStatus ("No, cactus.");

else if (e.getActionCommand ().equals ("B"))showStatus ("No, rocks.");

else if (e.getActionCommand ().equals ("C"))showStatus ("Correct! Juicy ants!");

else showStatus ("No, grass.");

Restrict input

Page 25: User Interface Designgorskicompsci.ca/ICS3U/Unit4/ppt8_User_Interface_Design2.pdfUser Interface Design Author Gorski, Amanda Created Date 12/10/2020 5:07:44 PM

Summary

Page 26: User Interface Designgorskicompsci.ca/ICS3U/Unit4/ppt8_User_Interface_Design2.pdfUser Interface Design Author Gorski, Amanda Created Date 12/10/2020 5:07:44 PM

Error Handling

Summary

Page 27: User Interface Designgorskicompsci.ca/ICS3U/Unit4/ppt8_User_Interface_Design2.pdfUser Interface Design Author Gorski, Amanda Created Date 12/10/2020 5:07:44 PM

Error Handling

Widget Arrangement

Summary

Page 28: User Interface Designgorskicompsci.ca/ICS3U/Unit4/ppt8_User_Interface_Design2.pdfUser Interface Design Author Gorski, Amanda Created Date 12/10/2020 5:07:44 PM

Error Handling

Widget Arrangement

Clear Instructions

Summary

Page 29: User Interface Designgorskicompsci.ca/ICS3U/Unit4/ppt8_User_Interface_Design2.pdfUser Interface Design Author Gorski, Amanda Created Date 12/10/2020 5:07:44 PM

Error Handling

Widget Arrangement

Clear InstructionsVisually Appealing

Summary

Page 30: User Interface Designgorskicompsci.ca/ICS3U/Unit4/ppt8_User_Interface_Design2.pdfUser Interface Design Author Gorski, Amanda Created Date 12/10/2020 5:07:44 PM

Error Handling

Widget Arrangement

Clear InstructionsVisually Appealing

Restricts Input

Summary