There are a couple of things you can do. First, I would try the which command to find out which java and javac the system is using (which javac). I would then check your PATH environment variable (just type $PATH) to see if the 1_4_1 directories are on it. However, unless you have put them there, I doubt they are.
There are a couple of places you can put java in your PATH, but my favorite is the /etc/profile file. Open that file (you need to be su or root) and look for the section that is setting the path directories. Add your 1_4_1 java /bin directory to that (and maybe remove any references to the 1_3 java if they are there). then logout and log in as a regular user. If you do either the $PATH or which java you should see it pointing to the 1_4_1 version now.
However, I wonder if something else is going on because I believe java 1_3_1 should have the Swing classes.