Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / GUI / May 2005

Tip: Looking for answers? Try searching our database.

Too much JMenu items in a JPopupMenu

Thread view: 
4l3x4ndr3@gmail.com - 26 May 2005 18:26 GMT
Hi,

I have got too much items in a JPopupMenu, so that the menu is to long
to fit in the screen. As a consequence, some items are not displayed.

I couldn't find any built-in method or parameter to cut the menu in 2
columns, as it is usually done.

I guess, it is not so complicated to do by myself. However, does
anybody knows an
existing solution our method.

Thanks a lot

alex
Fred L. Kleinschmidt - 26 May 2005 21:43 GMT
> Hi,
>
[quoted text clipped - 11 lines]
>
> alex

Having a menu that is too long to fit on the screen usually indicates a
design flaw. Multi-column menus are usually not the answer - cascading
menus are almost always a better choice. You should think about how to
group the items into sub-menus.

Signature

Fred L. Kleinschmidt
Boeing Associate Technical Fellow
Technical Architect, Common User Interface Services
M/S 2R-94  (206)544-5225

Arnaud Berger - 27 May 2005 07:48 GMT
Hi,

You really should split your huge menu into logical sub-menus.

Regards,

Arnaud

> Hi,
>
[quoted text clipped - 11 lines]
>
> alex
4l3x4ndr3@gmail.com - 27 May 2005 12:44 GMT
You're right.
But it just can not be done that way since all items are of the same
kind. Actually the popupmenu gives all the results of a request on a
connected database. It would have no sense to split them into submenus.

Anyone else has a solution ?

Thanks anyway

alex
Arnaud Berger - 27 May 2005 12:57 GMT
Hi,

Then, why wouldn't you use somethink like a JTable-->inside a
JScrollPane -->inside a JWindow
that you would pop up on demand ?

It seems to me that a popupMenu doesn't fit well for diplaying db results..

Regards,

Arnaud

> You're right.
> But it just can not be done that way since all items are of the same
[quoted text clipped - 6 lines]
>
> alex
John - 27 May 2005 14:42 GMT
>>You're right.
>>But it just can not be done that way since all items are of the same
[quoted text clipped - 18 lines]
>
> Arnaud

Nice solution. I can't think of a better way of doing it.
Fred L. Kleinschmidt - 27 May 2005 15:11 GMT
> You're right.
> But it just can not be done that way since all items are of the same
[quoted text clipped - 6 lines]
>
> alex

Don't put them in a popup menu. Put them in a scrolled list in a dialog.
Signature

Fred L. Kleinschmidt
Boeing Associate Technical Fellow
Technical Architect, Common User Interface Services
M/S 2R-94  (206)544-5225
#! rnews 1311
Xref: xyzzy rec.models.rockets:557335
Newsgroups: rec.models.rockets
Path: xyzzy!nntp
From: WallaceF <frederocket@boe.com>
Subject: Re: the voice of reason
X-Nntp-Posting-Host: pex003155.se.nos.boeing.com
Content-Type: text/plain; charset=us-ascii
Message-ID: <42972B29.601CCECE@boe.com>
Sender: nntp@news.boeing.com (Boeing NNTP News Access)
Content-Transfer-Encoding: 7bit
Organization: The Boeing Company
X-Accept-Language: en
References: <E7xle.581$jU5.662246@twister.nyc.rr.com> <42970CCE.4616863D@boe.com> <01rocket-DE6123.05264727052005@corp.supernews.com>
Mime-Version: 1.0
Date: Fri, 27 May 2005 14:14:01 GMT
X-Mailer: Mozilla 4.79 [en]C-CCK-MCD Boeing Kit  (Windows NT 5.0; U)

Jerry Irvine wrote:

>
> In article <42970CCE.4616863D@boe.com>, WallaceF <frederocket@boe.com>
[quoted text clipped - 4 lines]
>
> Attack the messenger is your strategy.

He's a big boy, like you, and like you, he can sit down and hush if he
doesn't like it..

> It is destructive and counterproductive, but for your audience it
> certainly seems to work!

Is the truth to painful for you big fine???

> Jerry
>
> > > heroes just get in the way
> > > - iz

I think iz tried to tell you something: "Move over Jerry, your in the
way"...

Fred
John McGrath - 28 May 2005 11:12 GMT
> I couldn't find any built-in method or parameter to cut the menu in 2
> columns, as it is usually done.

All you should need to do is create an appropriate LayoutManager and set
the layout of the popup menu for the menu.  I tried using a GridLayout
and it works fine, aside from the fact that GridLayout always lays its
components out by rows rather than columns.

Signature

Regards,

John McGrath



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.