I've just found my problem with a test.
I've put these lines on my RUN method (OBSERVABLE Class) :
setChanged();
notifyObservers("Something to show");
And it works. The OBSERVER class was notified, and show me the text on the JTextArea. Now, I've just to reorganize all my code to do so...
For those who encounter the same problem, I'll post an answer as soon as I reorganized my code.
Thanks a lot for your answers anyway @xiaowang :)
EDIT : SOLUTION
The problem is really silly. We simply have to replace this run() method
@Override
public void run()
{
try
{
// Driver initialization
Win32Driver driver=new Win32Driver();
driver.initialize();
GPSFrame gpscom=new GPSFrame();
gpscom.listPort();
}
catch (Exception e){ System.out.println("start "+e.toString()); }
}
By this :
@Override
public void run()
{
try
{
// Driver initialization
Win32Driver driver=new Win32Driver();
driver.initialize();
this.listPort();
}
catch (Exception e){ System.out.println("start "+e.toString()); }
}
EXPLANATION :
When I do GPSFrame gpscom=new GPSFrame();
, I create a new object gpscom, which parent is my current class, GPSFrame.
While calling gpscom.listPort();
, it notify our CURRENT CLASS GPSFrame, not the class ServerBoard.