0

I realize it might be a very stupid question, but how do I use JOptionPane with Xtend? I can't figure it out and I've been trying to get it working for a while now.

JOptionPane.showMessageDialog(getContentPane(), message); doesn't seem to work.

Eclipse gives me this error: The method or field JOptionPane is undefined for the type MyClassName

moskalak
  • 271
  • 2
  • 12
  • 3
    1) For better help sooner, post an [SSCCE](http://sscce.org/). 2) `The method or field JOptionPane is undefined..` Make sure there is an import for it. – Andrew Thompson Dec 20 '12 at 14:46
  • I'm sure there is an import for it. I'm working on providing a suitable SSCCE, I didn't do that because I thought JOptionPane should simply be used in another manner with Xtend. I'm very new to Java and can't really get the feel of it yet, I've to admit. Ehh, maybe I should just go back to .NET... – moskalak Dec 20 '12 at 15:02

1 Answers1

3

Static methods or fields are accessed by double colons in Xtend:

JOptionPane::showMessageDialog(..)

Please refer to the docs for details.

Sebastian Zarnekow
  • 6,609
  • 20
  • 23