It's the mission of JVM, as a developer, you should not think about this. while, it's a good idea to learn the event response mechanism java -- it will lead you to observer design pattern...:)

解决方案 »

  1.   

    To: feelyou(非鱼)
    所以我想知道这种消息发送的机制,现在能在自己的组件中发送消息,可是不能上溯到相应应该响应该事件的子组件。
    比如说:我在一个JFrame里自己生成了一个鼠标事件,按照该鼠标事件的坐标点,这个事件应该是JFram里的一个子组件响应,可是还是JFrame响应了这个鼠标事件。
    请大虾们赐教:)
      

  2.   

    Try to use dispatchEvent()...
      

  3.   

    it is based on the Model-View-Controller (MVC) application architecture(especial Swing Component), which separates three distinct forms of functionality within the application:The Model represents the structure of the data in the application, as well as application-specific operation on data. 
    The View accesses data from the model and specifies how that data should be presented. The Controller translates user actions on the model and selects the appropriate view based on user preferences. 
      

  4.   

    e.getSource() get the sender
    and java transport event through the interface and the class's calling,end the last layer or being consumed
      

  5.   

    我原来就用过dispatchEvent但是他响应的是参数object中相应的触发实践,也就是说,我必须自己找到应该是哪个组件响应再传进去。我想直接发送一个消息到系统消息队列里,让它自己判断该是哪个组件响应。我到是找到ToolKit.getEventQurrey().putEvt(),但这个方法是freind属性的,在java.awt包外就不能用了,看来我现在要找的是jdk的安全属性问题,得先看看书:)