java - How to set alert instead of showing unhandled exception in J2ME? -
i designing application shows unhandled exception due lot of reason. want application show alert in catch block instead.
you this:
private alert alert; private display display; // obtain display display = display.getdisplay(this); in consturctor catch(exception e) { alert = new alert("error occurred", "message: " + e.getmessage(), null, alerttype.error); alert.settimeout(alert.forever); display.setcurrent(alert, form); }
hope helps.
Comments
Post a Comment