Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

Scrolling for menu?

  Asked By: Chisisi    Date: Oct 12    Category: Java    Views: 1085

I have a menu which contains all the fonts, which is long and needs
to scroll. How do I make my menu scrollable?



4 Answers Found

Answer #1    Answered By: Dennis Hayes     Answered On: Oct 12

I've never seen any menu  with a scroll  bar, so actually I think this
is impossible (or at best not yet implemented anywhere), but I
wouldn't bet my hand on it...
I would simply a list box instead of a menu. The list box does have a

Answer #2    Answered By: Canan Kaya     Answered On: Oct 12

I think you are mistaken, there is a scroll  lets say
in your bookmark menu  in your browser, if you have too
many bookmarks downward then scroll bar ( horizontal
with arrow down) appear.
I do not know how to implement that but i think you
hust have to put your menu object in to scroll object

Answer #3    Answered By: Steve Boyd     Answered On: Oct 12

To the orginal poster: What have you implemented it in and what are you
trying to do with it?

Answer #4    Answered By: Raul Clark     Answered On: Oct 12

What I have right now is that I get a list of fonts  in the system,
then for each one I create a JMenuItem and add it to my JMenu.
What's happening is that the list is long  and goes off the bottom of
the screen, and there is no way to get to lower menu  items.

I tried adding the menuitems into a JScrollPane, then add the
JScrollPane into the menu. But in this case, it looks like the whole
JScrollPane is treated as a single menu item, I can't select the
items inside it.

Didn't find what you were looking for? Find more on Scrolling for menu? Or get search suggestion and latest updates.