User Tools

Site Tools


click_boxes_lab

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
click_boxes_lab [2018/11/23 12:12] cthielclick_boxes_lab [2018/11/23 12:18] cthiel
Line 13: Line 13:
 {{ ::clickboxes.java |ClickBoxes.java}} {{ ::clickboxes.java |ClickBoxes.java}}
 ==What else?== ==What else?==
-  - In the ''Box'' class, add a String field called ''label'', a ''setLabel'' method to have client classes change the contents of ''label'' and finally change the ''draw' method so it draws the label.  The syntax of the graphics method that will do it is ''drawString( String s, int x, int y)''  +  - In the ''Box'' class, add a String field called ''label'' 
-  - In the ''ClickBoxes''+  - In the ''Box'' classadd a ''setLabel'' method to have client classes change the contents of ''label''  
 +  - In the ''Box'' class,  change the ''draw'' method so it draws the label.  The syntax of the graphics method that will do it is ''drawString( String s, int x, int y)''  
 +  - In the ''ClickBoxes''' class alter the ''paintComponent'' method that changes the label of each box in the ''boxes'' ArrayList so that it it shows its order in the ArrayList.   
 + 
click_boxes_lab.txt · Last modified: 2018/11/23 12:19 by cthiel

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki