So, i have a JButton and a JTextField, and i need a way to connect both elements mouse events and make them act like JButton's mouse events. I.e., if i click on text field, button is clicked too, if mouse enters text field, then button acts like mouse entered it too, if mouse releases text field, then button acts like mouse released it too.
Now, what ways there is ? Is there something like button.setMouseState(entered), button.setMouseStateEntered(), or some other way to force mouse state for elements ? That way i could just set text field's mouse events to change button's mouse states.