Steps to reproduce:
- Menu "Aliases" > "New Alias..."
- enter a name, e.g. xy1
- select a driver that has no JAR installed, e.g. Apache Derby Client
- click "Properties"
- switch to Tab "Driver properties"
(it will display something like: Loading JDBC driver "Apache Derby Client" failed.)
- click X to close that window
- change the alias name to e.g. xy2
- select a different driver, e.g. HSQLDB Server
- click "Properties"
The result is:
- Tab "Driver properties" is already in front with message: Loading JDBC driver "Apache Derby Client" failed.
- the window title still is: Properties for Alias xy1.
So I think that X didn't close the window but only set it to invisible.
And reopening the Properies window resulted in just setting it back to visible ... with its previous settings not being updated.
I think this behaviour is the result of a combination of at least two circumstances:
a)
Calling dispose() on a JFrame / Window is not destroying that object.
(So - kind of suprisingly - it is possible to make a window visible again even after disposing it.)
b)
Closing the Alias Properties window via X in the window's title bar is not performing the same steps as the "Close" button.
So I think it would be a good idea to catch the "X" event and make sure it performs the same steps as "Close".
In general, I would have expected that "X" initiates the same behaviour as "Close".
(... at least if the available actions are "OK" and "Close".)
Another solution might be to check for "isDisplayable()" in AliasPropertiesController.showAliasProperties(...).
Fixed in our GIT repository. Will be available in future snapshots and versions.