?? radiobuttonexample.java
字號:
package org.j4me.examples.ui.components;
import org.j4me.logging.*;
import org.j4me.ui.*;
import org.j4me.ui.components.*;
/**
* Example of a <code>RadioButton</code> component.
*/
public class RadioButtonExample
extends Dialog
{
/**
* The previous screen.
*/
private DeviceScreen previous;
/**
* The radio button.
*/
private RadioButton button;
/**
* Constructs a screen that shows a <code>RadioButton</code> component in action.
*
* @param previous is the screen to return to once this done.
*/
public RadioButtonExample (DeviceScreen previous)
{
this.previous = previous;
// Set the title and menu.
setTitle( "RadioButton Example" );
setMenuText( "Back", null );
// Add the phone number box.
button = new RadioButton();
button.setLabel( "Log Levels" );
button.append( Level.DEBUG.toString() );
button.append( Level.INFO.toString() );
button.append( Level.WARN.toString() );
button.append( Level.ERROR.toString() );
button.append( Level.OFF.toString() );
button.setSelectedIndex( 1 ); // INFO
append( button );
}
/**
* Takes the user to the previous screen.
*/
protected void declineNotify ()
{
previous.show();
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -