Delegating controls to receive events

T

Timasmith

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.
 
M

Michael Rauscher

Timasmith said:
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.

Huh? Do you write a custom component?

Bye
Michael
 
T

Timasmith

Michael said:
Timasmith said:
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.

Huh? Do you write a custom component?

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,898
Latest member
BlairH7607

Latest Threads

Top