Object.notify() Wrong Context
posted 5 years ago
My method gets the file path in the JTree and feeds it to my outgoing email program MailDialog. The email program cannot send the file because it is locked while open in the JTree. With my method below, it is able to be sent, but the line ob.notify(); gives me a hint in NetBeans "invoking Object outside a synchronized context". This method resides in the subclass of JTree so the line synchronized(this) means this tree. Does anyone know what needs to be done to straighten this out? Thanks.