Data Connection Dialog for Java
In .NET there are Data Connection Dialog UI which allows users to build开发者_开发问答 connection strings and connect to specific data sources.
Is there similar thing for java?As far as I know, Swing and SWT UI library don't contain dialog for JDBC connection. Many programs (Eclipse, NetBeans, Squirrel SQL etc) have own developed connection dialog. I think it's not too hard to develop your own that you can even can share! :)
Being a general purpose language, no generic database connection dialogs are included with Java. The Microsoft version as the linked page states is an internal dialog from MS Visual Studio, the code of which has been released to the community for reference. Most Java IDEs have similar dialogs for working with database related projects, and some of those are open source so for them too it should be possible to fish the source for their dialogs out of their source code with some searching and pruning. But it's probably easier and faster to write your own, it's not such a big deal (especially using a quality GUI builder, handcrafting Swing code can be a painful experience but often yields more efficient and prettier code).
精彩评论