-
adding MenuItems to menu
Hi all,
I have a menu which has a bunch of submenus. One of these submenus contains
about 40 menuitems. Since it is too long it
runs off the screen. I need a way to some how scroll these
menu Items, so the submenu won't go off the screen.
First I tried to implement a new class that extends a JComboBox
and implements MenuElement interface. It works, but when I
click on the combo box, the popup menu hide itself before I do my selection.
Is there any way to keep the popmenu till i do
my selection?
Another attemp, I created a new class that extends JPanel and
impelments menuElement. I set the layout of JPanel to GridLayout(10,4) and
add JRadioButtonMenuItems to the panel. Again, the look is fine, BUT as soon
as the mouse passes over any of the
JRadioMenuItems, the popup disappears before I even do my selection. Any
body know why or how to fix it?
Any suggestions!
-
Re: adding MenuItems to menu
I applaud your ingenious fix attempts, but my solution would be to not have
40 items in a menu.
Franco <franco@hotmail.com> wrote in message
news:39996c29$1@news.devx.com...
>
> Hi all,
>
> I have a menu which has a bunch of submenus. One of these submenus
contains
> about 40 menuitems. Since it is too long it
> runs off the screen. I need a way to some how scroll these
> menu Items, so the submenu won't go off the screen.
>
> First I tried to implement a new class that extends a JComboBox
> and implements MenuElement interface. It works, but when I
> click on the combo box, the popup menu hide itself before I do my
selection.
> Is there any way to keep the popmenu till i do
> my selection?
>
> Another attemp, I created a new class that extends JPanel and
> impelments menuElement. I set the layout of JPanel to GridLayout(10,4) and
> add JRadioButtonMenuItems to the panel. Again, the look is fine, BUT as
soon
> as the mouse passes over any of the
> JRadioMenuItems, the popup disappears before I even do my selection. Any
> body know why or how to fix it?
>
> Any suggestions!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks