Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #34539

Re: Scrollable Popup Menu Keyboard Navigation

From Martin Gregorie <martin@address-in-sig.invalid>
Newsgroups comp.lang.java.programmer
Subject Re: Scrollable Popup Menu Keyboard Navigation
Date 2016-06-07 16:58 +0000
Organization A noiseless patient Spider
Message-ID <nj6ufv$t5i$1@dont-email.me> (permalink)
References <dfd94962-3cdc-4cf0-a142-2ccd54c2bb41@googlegroups.com>

Show all headers | View raw


On Thu, 07 Apr 2016 12:21:32 -0700, Eric Douglas wrote:

> Below is some runnable code of my scrollable popup menu, I think about
> as simple as I can get it.  I did write a hack with the key map to make
> page-up and page-down work.  I'm just wondering if I'm missing
> something.  Am I supposed to have to manually tell it what to do when
> someone presses page-up, page-down, home, end?  Why does just the up and
> down arrow keys work by default?  This also allows the down arrow to
> select menu items you can't see, so I also wrote a hack to keep the
> current item visible.
>
Yep, it compiles OK once I added some imports, and some bits work, but 
there is one omission and one rather obvious problem:

- the Jframe doesn't call setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE)
  which makes your code annoying to run.

- the scrollable menu doesn't. The scrollbar zonks up and down without
  affecting the visible menu items and the up and down arrows happily
  disappear off the bottom of the menu without scrolling anything up.

Both of which rather defeat your stated purpose in devising this 
structure. Or did you fix this later but not post it?


-- 
martin@   | Martin Gregorie
gregorie. | Essex, UK
org       |

Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

Scrollable Popup Menu Keyboard Navigation Eric Douglas <e.d.programmer@gmail.com> - 2016-04-07 12:21 -0700
  Re: Scrollable Popup Menu Keyboard Navigation Jeff Higgins <jeff@invalid.invalid> - 2016-04-08 00:12 +0000
    Re: Scrollable Popup Menu Keyboard Navigation Eric Douglas <e.d.programmer@gmail.com> - 2016-04-08 04:29 -0700
      Re: Scrollable Popup Menu Keyboard Navigation Jeff Higgins <jeff@invalid.invalid> - 2016-04-08 15:27 +0000
        Re: Scrollable Popup Menu Keyboard Navigation Eric Douglas <e.d.programmer@gmail.com> - 2016-04-08 08:52 -0700
          Re: Scrollable Popup Menu Keyboard Navigation Jeff Higgins <jeff@invalid.invalid> - 2016-04-08 16:31 +0000
            Re: Scrollable Popup Menu Keyboard Navigation Eric Douglas <e.d.programmer@gmail.com> - 2016-04-08 11:07 -0700
              Re: Scrollable Popup Menu Keyboard Navigation Jeff Higgins <jeff@invalid.invalid> - 2016-04-08 20:39 +0000
                Re: Scrollable Popup Menu Keyboard Navigation Eric Douglas <e.d.programmer@gmail.com> - 2016-04-08 14:00 -0700
                Re: Scrollable Popup Menu Keyboard Navigation Jeff Higgins <jeff@invalid.invalid> - 2016-04-08 21:43 +0000
                Re: Scrollable Popup Menu Keyboard Navigation Jeff Higgins <jeff@invalid.invalid> - 2016-04-09 11:46 +0000
                Re: Scrollable Popup Menu Keyboard Navigation Jeff Higgins <jeff@invalid.invalid> - 2016-04-08 22:33 +0000
                Re: Scrollable Popup Menu Keyboard Navigation Robert Klemme <shortcutter@googlemail.com> - 2016-04-10 11:20 +0200
          Re: Scrollable Popup Menu Keyboard Navigation Robert Klemme <shortcutter@googlemail.com> - 2016-04-10 11:20 +0200
            Re: Scrollable Popup Menu Keyboard Navigation Eric Douglas <e.d.programmer@gmail.com> - 2016-04-11 05:00 -0700
  Re: Scrollable Popup Menu Keyboard Navigation Jeff Higgins <jeff@invalid.invalid> - 2016-04-08 23:09 +0000
    Re: Scrollable Popup Menu Keyboard Navigation Eric Douglas <e.d.programmer@gmail.com> - 2016-04-11 05:13 -0700
    Re: Scrollable Popup Menu Keyboard Navigation Fredrik Jonson <fredrik@jonson.org> - 2016-04-18 08:50 +0000
      Re: Scrollable Popup Menu Keyboard Navigation Eric Douglas <e.d.programmer@gmail.com> - 2016-04-18 05:00 -0700
  Re: Scrollable Popup Menu Keyboard Navigation Martin Gregorie <martin@address-in-sig.invalid> - 2016-06-07 16:58 +0000

csiph-web