Review -- Using JDK Help to learn about a class - Rose
Download
Report
Transcript Review -- Using JDK Help to learn about a class - Rose
• Why important?
Recap: Using JDK Help
– Let’s you easily find which classes/methods can do what
operations for you
– The Java libraries are part of the POWER of Java
• How to do it?
– Help ~ JDK Help
• Highlight a class first to go straight to that class
• Practice using JDK Help:
– Open JavaEyes
– Using JDK Help, determine:
• Is pink a predefined Color?
Instructor: Demo how to
answer the following
questions while students
are working on the
questions themselves
– Answer: Yes, it is a static field of the Color class
• What method does an ActionListener have to implement?
– actionPerformed, a method that takes an ActionEvent and returns nothing
• How would you disable a QuitButton? (Hint: look for set… in …)
– Apply the setEnabled method with its parameter set to false
Fundamentals of Software
Style:
Development 1
Setters and getters are usually named set… or get…
Slide 1