• Post Reply Bookmark Topic Watch Topic
  • New Topic

JPopMenu goes out of screen  RSS feed

 
vinaya kumar
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
How to handle the Jpopmenu items when
no of menuitems goes out of screen..

any pointers...

vinaya
 
Manfred Leonhardt
Ranch Hand
Posts: 1492
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Two suggestions:
1. Re-register with a valid user name: firstName + space + lastName. Read the naming policy here .
2. Assuming you mean having to many items to display on one screen, you should use pullrights and group the items in a more usable fashion. No one likes to scrolldown more than 12 items on a menu.
Regards,
Manfred.
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
vinay,

You need to re-register with a user name that follows the JavaRanch UserName Guidelines. Your user name is required to be in the format "First Name" + space + "Last Name".

That said, on to you problem... What I would do is one of two things...
  • Organize my menuitems inside menus on the popup, so the the user pops the popup menu up, chooses a menu and then chooses a menu item.
  • Pop different popup menus up depending on where on the screen the user clicked. This way you will have a popup menu appropriate to whatever the user is trying to do.


  • -Nate
     
    vinaya kumar
    Greenhorn
    Posts: 8
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Oops! ,
    i have updated.
    problem with approach of grouping is that
    u have to stop that at some point.
    and thatz the root level.
    i my case For example. we have a display alpha bets in popmenu,how do u group them .
    Further my gui is such that the popmenu
    is always at lower half of the screen,leadng my worry.
    can we have a scroll bar to popmenu..
    if yes is that a good idea

    oh yes yes! i forgot !!
    i am creating popups dynamically,so don't know
    when it will exceed the screensize..
    is there a way to find the exceeding screen limit..
    i hope i am clear with the problem presenting
    Thanks and Regards
    vinaya
     
    Nathan Pruett
    Bartender
    Posts: 4121
    IntelliJ IDE Java Spring
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    You can get the screen size from the Toolkit.getScreenSize() method... it returns a Dimension...

    If you are displaying a list of languages or a full alphabet, that is too many things anyway! You need to redesign your GUI! A ComboBox on the GUI (or on a dialog window, if the list doesn't always need to be up...) takes up little space while it is not active, and when activated provides a scrollable list.

    Maybe we could give you some ideas about how to redesign your GUI if you said what you expect the user to do with the data in your popup...

    -Nate
     
    David Vickers
    Greenhorn
    Posts: 13
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Apologies for revisiting this old posting, but I am interested in the outcome.

    I have similar issue, and would like to limit the list of menuitems to 12 visible at a time, allowing the built-in scrolling to handle movement through the list?

    Any ideas,

    Dave
     
    Yan Bezugliy
    Greenhorn
    Posts: 3
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Has anyone had success implementing scrollable menu?
    Thanks.
     
    • Post Reply Bookmark Topic Watch Topic
    • New Topic
    Boost this thread!