Take the 2-minute tour ×

Swing is an integral part of the Java API. It is also the most popular GUI framework for Java. I still wonder, should every Java programmer still know, or at least be pretty familiar with, Swing (possibly excluding web developers)? There are alternatives (e.g. SWT), but they are not very widely used (compared to Swing).

What do you think about requiring Swing knowledge from Java programmers? If such knowledge is important, to what degree? Are the basics enough or not?

The reason I wonder is because I really don't like Swing but wonder if I still should brush up my skills in it. I'm able to create simple GUIs in it, but I would definitely not say that I know Swing well.

share|improve this question

closed as not constructive by gnat, Stephen C, Walter, Glenn Nelson, thorsten müller Dec 13 '12 at 13:57


The SWT guys & gals may disagree with you. –  jmq Mar 1 '11 at 22:16
Doing Java server stuff is very, very different from doing Java GUI stuff, and you don't need Swing for that. –  user1249 Mar 1 '11 at 22:16
IMHO, Java's heavy enterprise usage should make you safe without knowing Swing –  user Feb 22 '12 at 2:17
This question is non-constructive. It starts with a "strawman" assertion that Java is integral to Java (it patently isn't) and then proceeds to ask a series of subjective question. –  Stephen C Dec 13 '12 at 11:16
An experienced programmer can become proficient in Swing within a few weeks or months. If you hire a programmer for at least two years, I think not knowing Swing (yet) should not be a big problem. –  Giorgio Dec 13 '12 at 12:19

8 Answers 8

up vote 11 down vote accepted

It's only needed for people who do Java Desktop GUIs, and there's alternatives now. I spent a few years doing JavaEE apps and console-based apps. Never needed to touch Swing, and I was a successful JavaEE developer.

share|improve this answer

I'd say that every Java developer doesn't need to know it. You already qualified that web developers might not need it.

Do you write GUI applications? Are the chances of the framework used being Swing high? Do you plan to get a job writing Swing-based GUI? If yes, then you should know it. Otherwise, it likely doesn't matter.

The same reasoning can apply to just about any framework or technology.

share|improve this answer

I don't view swing as a core part of java in the same way as I think of streams, threading, collections, etc. I do quite a lot of interviewing and it's fairly rare for me to run across swing on someone's resume.

anecdotally, both my wife and I have been java developers for 10+ years, and neither of us has ever written a line of swing code.

share|improve this answer

As with any library, if you learn Swing deeply you'll probably forget most of it by the time you need it again. My recommendation would be to increase your breadth of learning until you need to use Swing.

There's also a LOT of swing info out there (much of it bad, unfortunately), so if you have a cursory understanding of the library and when it's appropriate to use, you should be able to google what you need to know.

If I advertised Swing as a prerequisite for a Java developer position I would certainly expect you to be upfront about what you know and possibly answer a couple trickier questions to see if you have production-level experience. However I wouldn't disqualify anyone without swing experience for a random JEE position.

share|improve this answer

It really depends on what you want to do. Swing is a great API for GUI work. You can make some pretty powerful widgets, but it does have a large learning curve, to say the least. I would guess that most java developers that are focusing on web development will never have a need for swing, so you could safely ignore it if you wish.

One thing Swing will give you that web development won't is a fuller understanding of GUI development outside of a web environment, but that is true with any rich GUI API.

share|improve this answer

Never touched it. My experience with ExtJS has been a lot more valuable. The Swing apps I have used have been miserably slow. Anyway, if I need to learn Swing, I will, just like I learned X/Motif and Tcl/Tk and .NET and ExtJS. If I can't convince a potential employer that I can do that, then I haven't managed the interview well.

share|improve this answer
"If I can't convince a potential employer that I can do that, then I haven't managed the interview well.": True. But there are interviewers who only look at what you can do right now. Not that I consider them good managers, but some do not think in terms of what you can learn and how long it will take you. –  Giorgio Dec 13 '12 at 13:16
Giorgio: Generally I don't want to work for people who value experience over ability. They tend to be long on experience and short on ability. Sure, if you need something done in the next two weeks, you want someone who is familiar with the technology. If you need a lot of things done in the next year, it makes more sense to just hire the best programmer you can find. –  kevin cline Dec 13 '12 at 17:16
What I meant is that a good programmer with little knowledge about Swing can learn Swing within a reasonable amount of time, and possibly be more productive than a mediocre programmer who knows Swing already. And that even a good programmer will perform bad in an interview if you ask questions on very specific topics she is not familiar with (even though, given a week or two, she can learn them). –  Giorgio Dec 13 '12 at 18:10

I think that if your product doesn't use it and isn't likely to ever use it, there's no reason to expect Swing knowledge as a baseline for "what makes a Java Developer". Just like any job skill, I think you need to always look for the right mix for the position, and if the position isn't going to use Swing, why bother expecting that the candidate knows it?

That said, I think that it fits into a baseline for what you can expect a Java developer to know of. I'd be pretty non-plussed to meet someone with 3 years of Java experience who couldn't answer the question "what is Swing?" with "An API for coding a GUI". But chances are, I wouldn't even bother to ask if I was interviewing for JEE skills.

share|improve this answer

Swing is a great GUI framework, probably the most purely OO GUI framework out there, so while it is not a core part of Java, it is an excellent thing to learn if you want to build quality applications. There is plenty of chances to implement design patterns such as decorator, MVC etc. The alternatives are SWT, and C#.

share|improve this answer
