Advertisement
Guest User

Untitled

a guest
Dec 8th, 2019
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.97 KB | None | 0 0
  1. package zadanie2linie;
  2.  
  3. import javax.microedition.lcdui.Command;
  4. import javax.microedition.lcdui.CommandListener;
  5. import javax.microedition.lcdui.Display;
  6. import javax.microedition.lcdui.Displayable;
  7. import javax.microedition.midlet.*;
  8.  
  9. /**
  10.  * @author Let
  11.  */
  12. public class Midlet extends MIDlet implements CommandListener {
  13.    
  14.     public Plotno plotno;
  15.     private Command cmd;
  16.     Display ekran;
  17.        
  18.     public Midlet(){
  19.    
  20.         plotno= new Plotno();
  21.         cmd = new Command("Koniec",Command.EXIT,0);
  22.         plotno.addCommand(cmd);
  23.         plotno.setCommandListener(this);  
  24.     }
  25.    
  26.     public void startApp() {
  27.         ekran = Display.getDisplay(this);
  28.         ekran.setCurrent(plotno);
  29.     }
  30.    
  31.     public void pauseApp() {
  32.     }
  33.    
  34.     public void destroyApp(boolean unconditional) {
  35.     }
  36.    
  37.     public void commandAction (Command c, Displayable d){
  38.         if (c == cmd){
  39.             notifyDestroyed();
  40.         }
  41.     }
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement