Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
处理这个问题的方法是什么Netbeans?
Netbeans
模块A和B是顶级组件
B 使用 Lookup API 查找 A,但获得了 A 的新实例,该实例作为新实例不会更新显示的原始 A 的 gui。
基本上 B 需要与 A 的原始实例对话。
与Netbeans父级是 Windows 应用程序,它似乎甚至没有可编辑的编码区域来发送实例。
最好的解决方案是拆分为 ATopComponent 和一些 AStorage(例如)。ATopComponent 应该在 AStorage 上实现 LookupListner。
要搜索 ATopComponent,您应该使用 WindowManager.getDefault().find(id of ATopComponent)