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


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

Re: Scrollable Popup Menu Keyboard Navigation

From Jeff Higgins <jeff@invalid.invalid>
Newsgroups comp.lang.java.programmer
Subject Re: Scrollable Popup Menu Keyboard Navigation
Date 2016-04-08 16:31 +0000
Organization A noiseless patient Spider
Message-ID <ne8mcu$dhg$1@dont-email.me> (permalink)
References <dfd94962-3cdc-4cf0-a142-2ccd54c2bb41@googlegroups.com> <ne6t1i$q9d$1@dont-email.me> <12b619c7-c6ba-4eb6-a064-e0b992b0c785@googlegroups.com> <ne8il1$v2$1@dont-email.me> <b5b0a40b-6f31-4055-a923-832c47944f2c@googlegroups.com>

Show all headers | View raw


On Fri, 08 Apr 2016 08:52:07 -0700, Eric Douglas wrote:

> On Friday, April 8, 2016 at 11:31:00 AM UTC-4, Jeff Higgins wrote:
>> Your entire original post was somewhat unclear, which may explain the
>> lack of responses other than mine - which you've dismissed. The use
>> case for a scrollable pop-up menu is, for me, unclear - but there seems
>> to be quite a bit of activity around it on the WWW. Searching
>> "java+scrollable +pop-up+menu" I find quite a few examples - none of
>> which involve a custom layout manager.
> 
> What's unclear about that?  It's a runnable self contained sample that
> displays a window.  Right click the window and you get a popup menu. 
> I'm asking why that popup menu can navigate by default using up and down
> arrow keys I didn't write anything special for, but I have to write key
> map code to manually tell it what to do if I want page-up and page-down
> to work.
> 
> Why do the up and down arrow automatically work?  Am I missing something
> to make the page-up and page-down work automatically?  Is there a better
> way to write a scrollable popup menu entirely that has keyboard
> navigation built in and/or looks cleaner?
> 
> If you Google that class you'll see I didn't come up with the layout
> manager.  I threw it in the example because it didn't look right without
> it.  It appears I copied that code from here:
> https://stackoverflow.com/questions/9288350/adding-vertical-scroll-to-a-
jpopupmenu

I'd suggest examining the code and documentation of the classes that you
are attempting to make use of to gain an understanding of how they work
and why they work as they do rather than relying on cut/paste cargo cult
programming. What does home, end, pgup, pgdn, left, right, up, down mean
to a generic scrollbar? A generic menu? How are those ideas implemented
or not in the classes you are attempting to use? What should they mean in
your scrollbar, menu?

Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next 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