• Post Reply Bookmark Topic Watch Topic
  • New Topic

MouseListener with JPanel and JTextField

 
Emil Karlsson
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have a JPanel with a GridBagLayout, added to the JPanel is a JTextField. I'm now trying to use the location() method in GridBagLayout to determine what cell I have released the mousebutton in. Everything is OK when I just make a click in an empty cell in the grid, but then I try to press down the button on a JTextField and drag the cursor over to an emtpy cell nothing works. The JTextField is dragenabled and the JPanel is dropenabled! Can anyone help me? Emil
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!