Advertisement
Guest User

Untitled

a guest
Mar 11th, 2017
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. import javax.microedition.lcdui.Command;
  2. import javax.microedition.lcdui.CommandListener;
  3. import javax.microedition.lcdui.Display;
  4. import javax.microedition.lcdui.Displayable;
  5. import javax.microedition.lcdui.Form;
  6. import javax.microedition.lcdui.Gauge;
  7.  
  8.  
  9. public class EkranWprDanych extends Form implements CommandListener {
  10. Command powrot;
  11. Display wyswietlacz;
  12. Displayable ekranP;
  13. Form form = new Form("Demo Form");
  14. Gauge aGauge = new Gauge("Score",true,10,1);
  15.  
  16. public EkranWprDanych(Displayable ekranPowrotny){
  17. super("Okno Wpr Danych");
  18. wyswietlacz = MojMidlet2.mojDisplay();
  19. ekranP = ekranPowrotny;
  20.  
  21. powrot = new Command("Powrot",Command.BACK,1);
  22.  
  23. this.addCommand(powrot);
  24. form.append(aGauge);
  25. wyswietlacz.setCurrent(form);
  26. this.setCommandListener(this);
  27. }
  28.  
  29. public void commandAction(Command komenda, Displayable ekranP) {
  30. if (komenda == powrot){
  31. wyswietlacz.setCurrent(ekranP);
  32. }
  33.  
  34.  
  35. }
  36.  
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement