Scala Swing: missing JComponent methods for component

I want to use setComponentPopupMenu (). But Scala.Swing.Component does not seem to have all the JComponent methods, although javax.swing.JComponent is referenced in the documentation. So I'm a little confused.

+5
source share
1 answer

The ScalaSwing api is rather incomplete, but it gives you access to the basic swinging object with peer. So you can do

 yourScalaSwingComponent.peer.setComponentPopupMenu(...)

You will return to java (swing) land.

+5
source

All Articles