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 / December 2003

Tip: Looking for answers? Try searching our database.

Sending events to components covered by another ?

Thread view: 
Christofer Dutz - 09 Dec 2003 12:08 GMT
Hi,

I am working on a small graphical tool in which I can place "objects"
(circles and boxes) on the main panel of my application. Then I can
connect these boxes with lines. If I drag an object from one place to
another, all connected lines are updated to the new position. The
connections are derived from Component and in the paint method I simply
draw th line.

My real problem now is that the main pane is the component used for
adding new components to the main pane. If I want to place a new object
near a connection the mouse-event is sent to the connections
mouse-listener.

How can I decide that an event isn't processed in the component that
recieved the event and pass it back to the components underneath?

Chris
Harald Hein - 10 Dec 2003 03:39 GMT
> The
> connections are derived from Component

Bad idea. Get a drawing framework like JHotDraw, and draw everything
using the 2D api.
Christofer Dutz - 10 Dec 2003 10:12 GMT
Harald Hein schrieb:

>>The
>>connections are derived from Component
>
> Bad idea. Get a drawing framework like JHotDraw, and draw everything
> using the 2D api.

Thanks for that hint ...

Mabe I should stop programming myself and simplg look where there are
open-source Projects that already do what I want and simply plug them
together. Unfortunately I already had a look with google and couldn't
find something fitting.

Mabe I just had the wrong search-terms

Thanks anyway,
    Chris
Harald Hein - 10 Dec 2003 20:04 GMT
> Mabe I should stop programming myself and simplg look where there
> are open-source Projects that already do what I want and simply
> plug them together.

It depends. If you want to learn things, do it yourself. But still,
forget about using Components fror graphics. Paint everything with the
2D API.


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



©2009 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.