Skip to main content
Ben Nadel at Scotch On The Rock (SOTR) 2010 (London) with: John Whish and Kev McCabe
Ben Nadel at Scotch On The Rock (SOTR) 2010 (London) with: John Whish Kev McCabe

2.3.9 Nested Views Codehs __full__ May 2026

A: You likely forgot to add the parent view to the main tab or forgot to call start() . Conclusion The 2.3.9 Nested Views exercise on CodeHS is a small but mighty step in your programming journey. Remember the golden rule: Containers hold content, and content answers to its container.

// Child: Name var name = new Text("Jane Developer"); name.setPosition(100, 120); name.setFont("bold 14pt Arial"); name.setTextAlign("center"); 2.3.9 nested views codehs

main.add(profileCard); Combine all the steps: A: You likely forgot to add the parent

function start(){ var main = new Tab(); // Parent container var profileCard = new Rectangle(200, 250); profileCard.setPosition(100, 100); profileCard.setColor("#f0f0f0"); profileCard.setBorderWidth(2); // Child: Name var name = new Text("Jane Developer"); name

Now go ahead, nest those views, and watch your UI come to life! Need more help? Check your CodeHS discussion forum or review the "Graphics and Events" section of your textbook. Happy coding!

I believe in love. I believe in compassion. I believe in human rights. I believe that we can afford to give more of these gifts to the world around us because it costs us nothing to be decent and kind and understanding. And, I want you to know that when you land on this site, you are accepted for who you are, no matter how you identify, what truths you live, or whatever kind of goofy shit makes you feel alive! Rock on with your bad self!
Ben Nadel
Managed ColdFusion hosting services provided by:
xByte Cloud Logo