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

📄 highscoreform.java

📁 j2merlsfk.rar使用不是标准的J2ME
💻 JAVA
字号:
package russiandiamand;

import javax.microedition.lcdui.*;

public class HighScoreForm
    extends Form
    implements CommandListener
{
    StringItem highScoreStringItem;

    private Command okCommand = new Command("确认", Command.SCREEN, 1);

    /** Constructor */
    public HighScoreForm()
    {
        super("高分");
        try
        {
            jbInit();
        }
        catch (Exception e)
        {
            e.printStackTrace();
        }
    }

    /**
     * Component initialization
     * @throws java.lang.Exception
     */
    private void jbInit() throws Exception
    {
        // Set up this Displayable to listen to command events
        highScoreStringItem = new StringItem("", "");
        highScoreStringItem.setLabel("高分");
        highScoreStringItem.setText("0");
        setCommandListener(this);
        // add the Exit command
        addCommand(okCommand);
        this.append(highScoreStringItem);
    }

    public void setScore(String score)
    {
        highScoreStringItem.setText(score);
    }

    public String getScore()
    {
        return highScoreStringItem.getText();
    }

    /**
     * Handle command events
     * @param command command
     * @param displayable displayable
     */
    public void commandAction(Command command, Displayable displayable)
    {
        if (command == okCommand)
        {
            DiamandMIDlet.display.setCurrent(DiamandMIDlet.diamandCanvas);
        }
    }

}

⌨️ 快捷键说明

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