Package javax.microedition.lcdui

Examples of javax.microedition.lcdui.Alert


            in = getClass().getResourceAsStream("/res/audio/alarm.mid"); // Read wav file, packaged in the jar file
            player = Manager.createPlayer(in, "audio/midi");
            player.start();

        } catch (Exception e) {
            alr = new Alert("Error", "Unable to play midi file!", null, AlertType.ERROR);
            alr.setTimeout(Alert.FOREVER);
            mDisplay.setCurrent(alr);
        }
    }
View Full Code Here


            in = getClass().getResourceAsStream("/res/audio/birdchirp.wav"); // Read wav file, packaged in the jar file

            player = Manager.createPlayer(in, "audio/x-wav");
            player.start();
        } catch (Exception e) {
            alr = new Alert("Error", "Unable to play midi file!", null, AlertType.ERROR);
            alr.setTimeout(Alert.FOREVER);
            mDisplay.setCurrent(alr);
        }

    }
View Full Code Here

            }
            // the player can start with the smallest latency
            player.prefetch();
            player.start();
        } catch (Exception e) {
            alr= new Alert("Error", "Unable to play sound file!", null, AlertType.ERROR);
            alr.setTimeout(Alert.FOREVER);
            mDisplay.setCurrent(alr);
        }
    }
View Full Code Here

            }
            // the player can start with the smallest latency
            player.prefetch();
            player.start();
        } catch (Exception e) {
            alr = new Alert("Error", "Unable to play sound file!", null, AlertType.ERROR);
            alr.setTimeout(Alert.FOREVER);
            mDisplay.setCurrent(alr);
        }

    }
View Full Code Here

            }
            // the player can start with the smallest latency
            player.prefetch();
            player.start();
        } catch (Exception e) {
            alr = new Alert("Error", "Unable to play sound file!", null, AlertType.ERROR);
            alr.setTimeout(Alert.FOREVER);
            mDisplay.setCurrent(alr);
        }
    }
View Full Code Here

        }
    }

    public void showError(String msg) {

        Alert a = new Alert("Error", msg, null, AlertType.ERROR);
        a.setTimeout(3000);
        mid.getLCD().setCurrent(a, new xunome.MultiPlayerForm(mid));
    }
View Full Code Here

            new Thread(this).start();
           
            getManager().showChatForm();
        } catch (Exception e) {

            Alert a = new Alert("Error", "Server couldn't be initialized.",
                                null, AlertType.ERROR);
            a.setTimeout(3000);
            mid.getLCD().setCurrent(a, new xunome.MultiPlayerForm(mid));
        }
    }
View Full Code Here

                case 4:

                    errorMsg = "Session doesn't exist.";
                break;
            }
            Alert a = new Alert("ERROR:", errorMsg, null, AlertType.ERROR);
            a.setTimeout(3000);
            mid.getLCD().setCurrent(a);
        } finally {

            try {
View Full Code Here

        } catch (BluetoothStateException e) {

            //#ifdef DEBUG
            System.out.println("Error when open bluetooth.");
            //#endif
            Alert error = new Alert("ERROR:", "Bluetooth couldn't be initalized.",
                                    null, AlertType.ERROR);
            error.setTimeout(3000);
            mid.getLCD().setCurrent(error);           
        }
    }
View Full Code Here

                    String providerName = info.substring(delimiter + 1);
                    serverOptions.append(serverName + " (" + providerName + ")", null);
                }
            } else {

                Alert notFound = new Alert("xUno ME", "No servers found.", null,
                                            AlertType.WARNING);
                notFound.setTimeout(3000);
                mid.getLCD().setCurrent(notFound, out);
            }
        } else {

            Alert noDevices = new Alert("xUno ME", "No devices found", null,
                                         AlertType.WARNING);
            noDevices.setTimeout(3000);
            mid.getLCD().setCurrent(noDevices, out);
        }
    }
View Full Code Here

TOP

Related Classes of javax.microedition.lcdui.Alert

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.