phamow / fest

Automatically exported from code.google.com/p/fest
0 stars 0 forks source link

Add method to JTabbedPaneFixture to get selected component #230

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What is the expected output? What do you see instead?

I tried

  frame.tabbedPane().selectTab(name).target.getSelectedComponent()

The selectTab(..) selects the tab using the EDT, but getSelectedComponent()
runs on my test thread.  What ends up happening in my case is that
getSelectedComponent() returns the previously selected tab because the AWT
event queue has not yet processed the selectTab().

What version of the product are you using? On what operating system?

FEST-Swing 1.0b2.1

Please provide any additional information below.

I was able to work around my problem by calling
JTabbedPane.getSelectedComponent() on the EDT via
SwingUtilities.invokeNowAndWait(..).  This required a lot of code
(relatively,) and I think it belongs in FEST-Swing.

Original issue reported on code.google.com by geis....@gmail.com on 4 Nov 2008 at 12:51

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Set the module as a label, instead of being part of the title.

Original comment by Alex.Rui...@gmail.com on 1 Dec 2008 at 5:12

GoogleCodeExporter commented 9 years ago

Original comment by Alex.Rui...@gmail.com on 5 Feb 2009 at 5:10

GoogleCodeExporter commented 9 years ago

Original comment by Alex.Rui...@gmail.com on 13 Feb 2009 at 7:37

GoogleCodeExporter commented 9 years ago
Fixed. Changes can be reviewed at 
http://code.google.com/p/fest/source/detail?r=2277
(r2277).

Thanks Ken!
-Alex

Original comment by Alex.Rui...@gmail.com on 13 Feb 2009 at 7:57

GoogleCodeExporter commented 9 years ago
Issue migrated to https://kenai.com/jira/browse/FEST-10

Original comment by Alex.Rui...@gmail.com on 14 Feb 2009 at 9:19

GoogleCodeExporter commented 9 years ago
Issue migrated to http://jira.codehaus.org/browse/FEST-12

Original comment by Alex.Rui...@gmail.com on 2 Mar 2009 at 7:27