Is there anyone that can explain me how does Java (or the JVM I don't know) know where I click?
I mean, I already know how to use JButton, mouseClicked Events etc. I was just wondering what happens between a click on a JButton with my mouse, and my JButton being triggered by Java to fire my Event. How does Java know I clicked on this particular button and not another or not somewhere else?
I tried to search on internet but didn't find anything about that.
EDIT : I'm wondering what is the flow of events between me clicking on my mouse on any component of my Java program, and my program reacting to this click by triggering an event like mouseClicked or actionListener (if implemented). Which part is handled by the OS and which part by Java or the JVM and finally which part by my program (if any).