JButton with both ActionListener / MouseListener
Is it possible to create a Jbutton with both an ActionListener and MouseListener Meaning so i create a button and then when i press it ( throught actionListener) it changes the frame so that AFTER then button was pressed i can press anywhere on the frame and MouseListener would in use. JButton button = new JButton();//Creates Button button.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { //Insert MouseListener //Then do something with mouseListener } }); Heres the curent code: however they're now in sync when i try to click the button and i cannot call mous
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.