Rich Oliver
Rich Oliver

Reputation: 6109

Scala Swing: missing JComponent methods on Component

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.

Upvotes: 5

Views: 177

Answers (1)

Didier Dupont
Didier Dupont

Reputation: 29528

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.

Upvotes: 5

Related Questions