P.33 (Add All 12 White Keys)


public Piano() {
  super(800, 340, 1);
  for(int i=0; i<12; i++) // Repeat 12 times
    addObject( new Key("g", "3a.wav"), 32, 140 );
}
Last modified on
Engineering DIY Workshop 2018