title: Making a JFrame and Observable Object
body: <p>I have a class let's say <code>MyJFrame</code> which represent the GUI of my application. It implements the interface <code>Observer</code> and override the method <code>update</code>.</p>
  
  <pre><code>public class MyJFrame extends JFrame implements Observer{
    ...
    public void update(Observable arg0, Object arg1){
       ...
    }
  }
  </code></pre>
  
  <p>Now I want to make also my JFram an Observable object but I can't because it already extend the class <code>JFrame</code>. I tried to create a variable of type Observable in my class.</p>
  
  <pre><code>public class MyJFrame extends JFrame implements Observer{
    Observable observable = new Observable();
  </code></pre>
  
  <p>The problem here is that I can add Observer to this observable field and I can also notify the observer but I cannot invoke the method <code>setChanghed()</code> (because it is declared as protected) which has to be called before the notification.</p>
  
  <p>Do you have any idea about I can implement it?</p>
  
  <p>Thanks!!</p>