views:

763

answers:

5

I am writing a fat client application that I would ideally like to be cross-platform, but may settle for Windows-only based on the following:

  • I am much stronger in C# than Java (though I have a few years Enterprise Java experience)
  • I haven't done much with either Windows Forms or Java Swing, just toy apps for each, though I'm more comfortable in Windows Forms than Swing
  • I am concerned about the performance of Swing applications (vs. Windows Forms), but I'm wondering if things have improved in the last couple years
  • I am completely open to developing in either platform...no MS or Java snobbery here. In fact, if you want to tell me to do it in Qt, wxWidgets, or something else, I'll listen!

If any of you switched from Windows Forms to Swing, what were the biggest hurdles?

Was the initial appeal of being cross-platform worth it in the end, or would a faster, less flexible Windows-only app have been better?

If you use Java Swing, which IDE do you prefer for drag/drop form layout?

+1  A: 

Well, of course it is a matter of taste, but for a windows-only environment i would prefer windows forms ( which you theoretically could try to run on other platforms via Mono ) or WPF (which is a best option for a fat client application as far as i am concerned ). I saw a lot of really ugly Swing applications, which are however cross platform. Indeed, with a little extra work you can get almost native look on each platform. You can use NetBeans for drag/drop with Swing.

n535
+5  A: 

It looks like what you want to hear is: "Don't use swing keep with Winforms" so here it goes: Don't use swing. If you feel more comfortable with C# I think that's the only reason you need to go for it.

Swing apps are fast and the whole platform is good enough, but it definitely needs some time to learn it.

If you decide to give it a try, I'll suggest either Netbeas or IntellJ Idea, both have great GUI builders.

But really, just keep with C#

OscarRyz
+3  A: 

Download Netbeans and try to make a simple Swing application in it. The GUI editor is really nice and powerful, and makes it easy to avoid doing the design by hand. You then add functionality with code snippets placed where Netbeans tells you to.

I did at simple "read in Excel sheet to JTable and upload JTable to database" GUI application from scratch in a day. I was planning just to do the GUI in Netbeans and then import it to Eclipse and do the grunt work there, but it was much easier just staying in Netbeans.

Try it, you might like it.

Edit: Regarding the speed of Swing: There has been a LOT of improvements and basically it can be very fast and snappy. The usual problem is for the programmer to create as responsive code for Swing to call to do its things, and there are a few technical things you need to figure out if you run into that issue (basically do heavy stuff on background threads).

Thorbjørn Ravn Andersen
+1  A: 

One point that none of the other answers has addressed is, what are the end-users of the application expecting? Do they need a cross platform app?

I've had a quick look at the Visual Guide to Swing Components (Windows Look and Feel) and all the components appear to have a Windows XP styling, which may be an issue if your oftware is going to be run on Windows Vista/7 (That said, the Swing library may well re-theme itself when run under Vista/7, but I couldn't find anything that said either way).

Rob
A: 

It's easier to work with Forms because of the better design tools in Visual Studio and the help from msdn and other sources. Swing appears to be slow to start when compared to the Forms. See: http://www.codeproject.com/KB/dotnet/RuntimePerformance.aspx Also today Swing is less used on the desktop than other technologies.

dmihailescu