I gave -ms32m -mx128m during the program startup. The total memory size of the solaris box is 128MB. This is bad. This means that the JVM can grow to use
all the memory on the box. Well, the system will start using virtual memory before that happens - that's why things have gotten very slow for you. The system is spending all its time swapping them out of memory.
I would definitely reduce the -mx amount. Take a look at how much memory your other processes use when your java VM isn't running/ Make sure they have
at least that much available even when the JVM is at maximum. If other processes need 30 MB, then set -mx to maybe 70-80 at most (leave some extra space).
In fact, cutting -mx down a lot more is probaly good. Either (a) the system will clear itself more quickly and easily, or (b) the JVM will throw OutOfMemroyError more promptly (indicating that you have a memory leak which GC cannot fix). This makes it much easier for you to study and debug the problem - you don't want to wait 3 weeks to see your program crash; you want to see it in as little time as possible. Then edit the code to see if you can fix the problem, and try again. A fast turnaround time is a good thing for debugging. Crash early, crash often. Of course, this assumes you're not currently running this thing in production. If you are - well, make a copy, give it very little memory, and experiment on that - and give the main program a large but reasonable amount of memory so it doesn't die too frequently while you try to fix the problem.
If you are getting OutOfMemoryErrors, well, you've got to look at where you're keeping references. Instance variables and class variables are good candidates, especially if they're Vectors. And if you're using 1.1 (ugh) then you may want to consult the bug reports for "memory leak" and any unusual classes you're using. I remember that there were several AWT components that seemed to have leaks in them.

Consider getting a commercial memory tool like JProbe; could very well be worth the money. Good luck...