"J2EE" is the old name for Java EE =
Java Enterprise Edition. It's a large set of specifications and APIs to build enterprise Java applications, for example web applications (
servlets, JSPs,
JSF etc.) and many other kinds of server side Java software.
Swing is an API for building desktop GUI applications with Java.
The two are totally different things, for different purposes.