Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Java Build a JavaFX Application It's About Time Event Handlers

This is insane! Please help!

I cant tell you how many times I watched the video and tried about every method in Oracle documentation!!!

2 Answers

Gavin Ralston
Gavin Ralston
28,770 Points

The answers are definitely in the docs.

Using the Java Docs, in the method summary for the MediaPlayer, try searching for keywords like "onPlay" and "onStop" and see if you come up with the actual method names using the documentation.

As for the question about what to pass into the constructor, check the "Constructors" section in the documentation. There's only one signature there, so it's kind of a gimme. :)

Thank you, I felt like I was taking crazy pills!

Gavin Ralston
Gavin Ralston
28,770 Points

Glad I could help!

Searching through all those methods is tough if you can't recall the name of the method at all. In cases like that, try searching for terms that make sense. Sometimes they'll appear in the summaries, or even in the detailed listing for the methods.

Thanks for the advice, I appreciate it!