Search code examples
javaswinghaxe

How do I reference javax classes with Haxe?


According to this answer (which is a few years old), it should be straightforward to refer to Swing classes from Haxe and it should Just Work™. But, when I clone the referenced gist and try to build it, it says there is an error:

Main.hx:4: characters 7-25 : Type not found : javax.swing.JPanel

I can refer to anything in java.* and it seems to work just fine.

How can I solve this?


Solution

  • Try java.javax.swing.JPanel instead of javax.swing.JPanel.