We Recommend

Java How to Program Java How to Program
Takes a new tools-based approach to Web application development that uses Netbeans 5.5 and Java Studio Creator 2 to create and consume Web Services. Features new AJAX-enabled, Web applications built with JavaServer Faces (JSF), Java Studio Creator 2 and the Java Blueprints AJAX Components. Includes new topics throughout, such as JDBC 4, SwingWorker for multithreaded GUIs, GroupLayout, Java Desktop Integration Components (JDIC), and much more.


Posted By

javapda on 07/01/07


Tagged

sun SPOT


Versions (?)


Sun SPOT First Post


Published in: Java 


When you write an Application for a Sun SPOT you are at the very least writing something called a MIDlet...as in javax.microedition.midlet.MIDlet. This may look familiar to people who have done J2ME development.

  1. public class FirstMIDlet extends MIDlet {
  2.  
  3. protected void startApp() throws MIDletStateChangeException {
  4. // the guts/essence of your MIDlet here
  5. }
  6.  
  7. protected void pauseApp() {}
  8.  
  9. protected void destroyApp(boolean arg0) throws MIDletStateChangeException {}
  10.  
  11. }

Report this snippet 

You need to login to post a comment.