Skip to content

Commit

Permalink
add menu shortcut
Browse files Browse the repository at this point in the history
  • Loading branch information
cdcsgit committed Dec 24, 2021
1 parent d527e70 commit dfff310
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/com/blogspot/kotlinstudy/lognote/MainUI.kt
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ class MainUI(title: String) : JFrame() {

mMenuBar = JMenuBar()
mMenuFile = JMenu(Strings.FILE)
mMenuFile.mnemonic = KeyEvent.VK_F

mItemFileOpen = JMenuItem(Strings.OPEN)
mItemFileOpen.addActionListener(mActionHandler)
Expand All @@ -261,13 +262,15 @@ class MainUI(title: String) : JFrame() {
mMenuBar.add(mMenuFile)

mMenuView = JMenu(Strings.VIEW)
mMenuView.mnemonic = KeyEvent.VK_V

mItemFull = JCheckBoxMenuItem(Strings.VIEW_FULL)
mItemFull.addActionListener(mActionHandler)
mMenuView.add(mItemFull)
mMenuBar.add(mMenuView)

mMenuSettings = JMenu(Strings.SETTING)
mMenuSettings.mnemonic = KeyEvent.VK_S

mItemAdb = JMenuItem(Strings.ADB)
mItemAdb.addActionListener(mActionHandler)
Expand Down Expand Up @@ -330,6 +333,7 @@ class MainUI(title: String) : JFrame() {
mMenuBar.add(mMenuSettings)

mMenuHelp = JMenu(Strings.HELP)
mMenuHelp.mnemonic = KeyEvent.VK_H

mItemHelp = JMenuItem(Strings.HELP)
mItemHelp.addActionListener(mActionHandler)
Expand Down

0 comments on commit dfff310

Please sign in to comment.