简体   繁体   中英

Dialog.show does not display with Codename One, NetBeans and Java

using NetBeans 7.4 and Java, Dialog.show("x","y","YES","NO"); won't display. I'm following Codename One's Hello World demo as an example.

Codename One seems to be a Java framework for generating platform independent UIs for mobile devices. I just downloaded the plugin for Netbeans 7.4 via Tools->Plugins.

I generated a demo project from scratch and looked through the code. There is a class in the package userclasses called StateMachine . I put your code sample into the initvars method. Looks now like this:

protected void initVars(Resources res) {
    Dialog.show("x","y","YES","NO");
}

Running this little demo, I got the dialog shown instantly. Hope this helps.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM