Hi,

Sorry to post so frequently on these forums – the feedback I've been getting has been very useful.

I've followed the Login Screen tutorial on the NetBeans website which shows the basics (http://netbeans.org/kb/71/javame/loginscreen.html). It seems, however, the login process assumes the provided credentials are correct just by the fact that an "HTTP_OK" response code was received (I assume this has something to do with the fact that the login() method throws an IOException?)

Surely this only indicates that the handset has a working connection to the Internet? How would I do both? For example, check that the response code is "HTTP_OK" and then check credentials are correct?

Currently I have the following code in place, which works, but means that a link exists which isn't reflected in the Visual MIDlet designer.

Many thanks

Code:
if (command == WaitScreen.FAILURE_COMMAND) {
                // write pre-action user code here
                switchDisplayable(getLoginConnectionFailureAlert(), getLoginScreen());
                // write post-action user code here
            } else if (command == WaitScreen.SUCCESS_COMMAND) {
                // write pre-action user code here
                if (login) {
                    // Display main app window
                    switchDisplayable(null, getMainWindowList());
                }
                else {
                    // Login failed, display alert and go back to login screen
                    switchDisplayable(getLoginCredentialFailureAlert(), getLoginScreen());
                }
 
                // write post-action user code here
            }