I am having trouble extracting the important information from the
javabeans lesson.

In particular.

--------------------
Code-1.13
public class SimpleBeanJLabel extends JLabel
        implements Serializable {
Why this complexity?
javaL = new JLabel("Hello world!", Swing.Constants.CENTER).
would be simpler.

Assuming we want to set the opacity properties etc, apparently the way
to do it is create a new class that inherits from JLabel and sets all
the properties in the constructor.

But why the implements Serializable? There seems to be no point to it
other than introduce a feature that may be used down the line but is
not used in the example.

What is the interface that Serializable expects? (ie some of the
method names are no longer random, which?)
------------------------
Example 4.1 is ok
1. implement ActionListener Interface
2. define actionPerformed
3. instanciate and event handler object
4. register the event handler object with the button.
--------------------------
but can someone help me with Example 4.2?

what part of example 4.1 are we replacing, and why?
What part of example 4.1 stays the same?

I am having trouble parsing the code from example 4.2 into relevant
information.

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/javaprogrammingwithpassion?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to