📄 picture.java
字号:
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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -