⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 holamundo.java

📁 J2ME 技术开发的扑克牌类游戏 是开源代码
💻 JAVA
字号:
/*
 * Molamundo.java
 *
 * Created on 2 de junio de 2005, 15:59
 */

package telefono;

import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;

/**
 *
 * @author Enrique Vicent Ramis
 * @version
 */
public class HolaMundo 
        extends MIDlet 
        implements CommandListener 
{
    private Command exitCommand;
    private Display display;
    private Form screen;
 
    public HolaMundo()
    {
        display = Display.getDisplay(this); 
        exitCommand= new Command("Salir",Command.EXIT, 2);
        screen=new Form("testing");
        screen.addCommand(exitCommand);
        screen.setCommandListener(this);
        // Creamos la pantalla principal (un formulario)
        screen = new Form("HelloWorld");
        // Creamos y a?adimos la cadena de texto a la pantalla
        StringItem saludo = new StringItem("","Hola Mundo...");
        screen.append(saludo);
        screen.setTitle("Programa de pruebas");
        Ticker ticker=new Ticker("todos los d?as cuando me levanto tengo la pirula m?s dura que un canto...");
        screen.setTicker(ticker);
    }
    public void startApp() 
    {
        // Seleccionamos la pantalla a mostrar
        display.setCurrent(screen); 
    }
    
    public void pauseApp() 
    {
    }
    
    public void destroyApp(boolean unconditional) 
    {
    }

    /** metodo de CommandListener 
     */
    public void commandAction(Command command, Displayable displayable) 
    {
        // Salir
        if (command == exitCommand) 
        {
            destroyApp(false);
            notifyDestroyed(); 
        } 
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -