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.
为了尊重要求,我暂时使用了一种技巧,将数字 id 与表示视图中相应用户名的字符串交换。
为此,我直接从 TableModel 中调用了 DAO。显然,这不是很优雅,从设计的角度来看可能是不合适的。实现这一目标的正确方法是什么?
TableModel 是从 EDT 查询的,因此不应该阻塞 - 所以调用 DAO 可能是个坏主意。您可以:
1 可能是最容易实现的选项。