Observer « JFrame « Java Swing Q&A





1. Making a JFrame and Observable Object    stackoverflow.com

I have a class let's say MyJFrame which represent the GUI of my application. It implements the interface Observer and override the method update.

public class MyJFrame extends JFrame implements Observer{
  ...

2. Java View to Controller Observer    stackoverflow.com

I need help. I am struggling to get my Observers working in java. Can someone explain to me using MODEL-VIEW-CONTROLLER Architecture how to create and observer from View To Controller. This is ...

3. how to inherit(extends) two classes JFrame and Observer    forums.oracle.com

You can't but you don't need to. As pointed out, Observer is an interface. I wonder what you're up to, though. Extending JFrame is entirely unnecessary, and also, why should the UI be an observer? Shouldn't you have a controller making the changes for you? Sounds like your design is a bit skewed