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

📄 checkboxexample.java

📁 j2me的1套UI框架,可以帮助开发者迅速的开发j2me应用程序.
💻 JAVA
字号:
package org.j4me.examples.ui.components;

import org.j4me.ui.*;
import org.j4me.ui.components.*;

/**
 * Example of a <code>CheckBox</code> component.
 */
public class CheckBoxExample
	extends Dialog
{
	/**
	 * The previous screen.
	 */
	private DeviceScreen previous;
	
	/**
	 * The check box.
	 */
	private CheckBox checkbox;
	
	/**
	 * Constructs a screen that shows a <code>CheckBox</code> component in action.
	 * 
	 * @param previous is the screen to return to once this done.
	 */
	public CheckBoxExample (DeviceScreen previous)
	{
		this.previous = previous;
		
		// Set the title and menu.
		setTitle( "CheckBox Example" );
		setMenuText( "Back", null );

		// Add the phone number box.
		checkbox = new CheckBox();
		checkbox.setLabel( "I agree to the terms." );
		checkbox.setChecked( true );
		append( checkbox );
	}

	/**
	 * Takes the user to the previous screen.
	 */
	protected void declineNotify ()
	{
		previous.show();
	}
}

⌨️ 快捷键说明

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