Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Delegating controls to receive events

Reply
Thread Tools

Delegating controls to receive events

 
 
Timasmith
Guest
Posts: n/a
 
      11-15-2006
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.

 
Reply With Quote
 
 
 
 
Michael Rauscher
Guest
Posts: n/a
 
      11-15-2006
Timasmith schrieb:
> 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



 
Reply With Quote
 
 
 
 
Timasmith
Guest
Posts: n/a
 
      11-15-2006
Michael Rauscher wrote:
> Timasmith schrieb:
> > 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.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Delegating construction. Roedy Green Java 0 07-19-2005 07:24 AM
Delegating Access Hector MCSE 2 03-11-2005 06:07 AM
Delegating Events between User Controls? Johannes Eble ASP .Net 2 05-27-2004 08:28 AM
Re: delegating constructors Randy Smith Java 5 09-29-2003 03:55 PM
Sorting a JTable with a delegating TableModel Brian J. Sayatovic Java 2 07-15-2003 10:10 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57