?? e814. creating a menu item that listens for changes to its selection status.txt
字號:
A menu item can receive notification of selection changes by overriding its menuSelectionChanged() method. See also e808 Creating a JMenuBar, JMenu, and JMenuItem Component.
JMenuItem item = new JMenuItem("Label") {
// This method is called whenever the selection status of
// this menu item is changed
public void menuSelectionChanged(boolean isSelected) {
// Always forward the event
super.menuSelectionChanged(isSelected);
if (isSelected) {
// The menu item is selected
} else {
// The menu item is no longer selected
}
}
};
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -