I want to use the setComponentPopupMenu(). But Scala.Swing.Component doesn't seem to have all the JComponent methods although javax.swing.JComponent is referenced in the documentation. So I'm a bit confused.
Asked
Active
Viewed 175 times
1 Answers
5
The ScalaSwing api is rather incomplete, but it gives you access to the underlying swing object, with peer
. So you can do
yourScalaSwingComponent.peer.setComponentPopupMenu(...)
You're back in java (swing) land then.

Didier Dupont
- 29,398
- 7
- 71
- 90
-
Thanks. I can now make sense of this other question: http://stackoverflow.com/questions/938753/scala-popup-menu you can make your own wrapper but you still seem to have to pimp the methods across one at a time. – Rich Oliver Aug 17 '12 at 09:08