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.
我想使用 setComponentPopupMenu()。但是 Scala.Swing.Component 似乎没有所有 JComponent 方法,尽管在文档中引用了 javax.swing.JComponent 。所以我有点困惑。
ScalaSwing api 相当不完整,但它让您可以访问底层的 swing 对象,使用peer. 所以你可以做
peer
yourScalaSwingComponent.peer.setComponentPopupMenu(...)
那么你又回到了java(swing)领域。