The java you are referring to that was implemented in june of last year was support for JavaSwing elements, and a swing URCap has a slightly different structure. I believe the functionality you’re looking for can be implemented by creating a class which extends JPanel
, and overrides the paintComponent(Graphics g)
method, and uses the Graphics
object to do any painting/drawing. Take a look at this and this for more info.
EDIT: I believe canvas
is an older java object, and I’m not sure if its supported under URCaps, but from research it seems that the method i describe above will accomplish the same thing