0

我意识到这可能是一个非常愚蠢的问题,但是如何将 JOptionPane 与 Xtend 一起使用?我无法弄清楚,我一直在努力让它工作一段时间。

JOptionPane.showMessageDialog(getContentPane(), message);似乎不起作用。

Eclipse 给了我这个错误:The method or field JOptionPane is undefined for the type MyClassName

4

1 回答 1

3

在 Xtend 中通过双冒号访问静态方法或字段:

JOptionPane::showMessageDialog(..)

有关详细信息,请参阅文档

于 2012-12-20T15:09:34.383 回答