Can sgine act as a component in swing?

0 views
Skip to first unread message

philip

unread,
Nov 9, 2010, 10:19:58 AM11/9/10
to sgine-dev
Hi,

Can I have a swing component and have sgine render just inside that
component, while the rest of the swing application is normal?

Could I have more than one component on my swing app with sgine inside
those boxes?

Thanks, Philip


Hicks, Matt

unread,
Nov 9, 2010, 10:34:02 AM11/9/10
to sgin...@googlegroups.com
Yes, if you're using StandardDisplay you'll simply need to construct a concrete class from the trait:

val display = new StandardDisplay {
}

then invoke createCanvas:

val canvas = display.createCanvas()

You'll get back a java.awt.Canvas instance that you can add a Component to AWT or Swing.
Reply all
Reply to author
Forward
0 new messages