Problems with ActionEvent for JButton
I'm having problems getting an ActionEvent on a JButton to fire the first time the JButton is clicked. I have a JTabbedPane where each pane contains a JPanel inside a JScrollPane. On one of the panes (not the first) are two JFormattedTextFields, a JTable, and four buttons, one of which is enabled when the user selects that tab. The problem I'm running into, and the one that annoys our clients, is that it always takes two clicks to get the ActionEvent for this JButton to fire. I've tried a number of things: invoking requestFocus() on the JPanel and on the JButton when that tabbed pane is selected, setting the button up as the default button on the pane, etc. But nothing I've tried seems to work. If I physically select any of the other controls in the panel, then the first time the JButton is clicked, the ActionEvent fires. But if the user clicks the JButton immediately after the tabbed pane is selected, the event doesn't fire. Can anyone give me some ideas on what could be causing this?