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 / November 2006

Tip: Looking for answers? Try searching our database.

Delegating controls to receive events

Thread view: 
Timasmith - 15 Nov 2006 16:42 GMT
I want to have a comboxbox and an elipsis ... button treated as a
single control.

If I use a JPanel + BorderLayout with a combobox using the 'Center' and
the button the 'East'

[________] [...]

For most interactions I want the events to go to the combobox.  Rather
than overloading and redirecting each individual JPanel method, can I
somehow delegate the combobox to receive everthing by default.

Then I would code a few specific things for the elipsis button.
Michael Rauscher - 15 Nov 2006 18:23 GMT
Timasmith schrieb:
>  I want to have a comboxbox and an elipsis ... button treated as a
> single control.
[quoted text clipped - 7 lines]
> than overloading and redirecting each individual JPanel method, can I
> somehow delegate the combobox to receive everthing by default.

Huh? Do you write a custom component?

Bye
Michael
Timasmith - 15 Nov 2006 18:45 GMT
> Timasmith schrieb:
> >  I want to have a comboxbox and an elipsis ... button treated as a
[quoted text clipped - 13 lines]
> Bye
> Michael

Sure, if you want to call treated panel+combo+button a 'custom
component'.

Putting them together simplifies the layout and interface code
significantly.
Michael Rauscher - 15 Nov 2006 20:34 GMT
FUD2 comp.lang.java.gui

Timasmith schrieb:
> Sure, if you want to call treated panel+combo+button a 'custom
> component'.

No. A custom component is something that is a (indirect) subclass of
(J)Component. To treat two components like one might be related to e. g.
instance creation only.

> Putting them together simplifies the layout and interface code
> significantly.

If *this* is the intention for your proposition, then I have to say that
there's absolutely no need for creating a custom component and I would
give the advise to forget it.

Bye
Michael


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.