picture.java
来自「Micro Window Toolkit(MWT)是一个用于开发J2ME用户界面」· Java 代码 · 共 38 行
JAVA
38 行
package com.viacube.j2me.component;
import mwt.Button;
import mwt.EventListener;
import mwt.Label;
import com.viacube.j2me.model.ImageList;
public class Picture extends SubWindow implements EventListener{
Button button;
String[] s = {"Picture one","Picture two"};
public Picture(int x, int y, int width, int height) {
super(x, y, width, height,true);
add(new Label(2,3,60,10,"Picture"));
for(int i=0;i<2;i++){
button = new Button(1, 14+i*20, width-2, 15, "", this, ACTION_SELECT);
button.setText(s[i]);
button.setIconImage(ImageList.small[4]);
add(button);
}
// this.setEnabled(false);
}
// public void processEvent(int eventType, Component c, Object[] args) {
// switch ( eventType) {
// case EVENT_ACTION: // when a button is pressed an event action is triggered
// switch ( ((Button) c).getActionType()) {
// // case ACTION_EXIT: exit = true; return;
// case ACTION_SELECT:
// dialog.setSkin(Window.STYLE_DEFAULT, new Skin(new int[]{0xeeeeee, 0xB2C4DF}));
// MainWindow.mw.win.dialogOpen(dialog);
// break;
// }
// }
// }
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?