I HAVE TWO JPANELS named "UI" and "OUTPUTPAGE1" and one JScrollPane in which UI Jpanel is already present ....i want to replace UI Jpanel by OUTPUTPAGE1 JPanel by a mouseclick event
HELP!!
And that is way I suggested you need to start with an SSCCE.
Create a simple program that does what you need. Prove to yourself that it indeed is only a single line of code that is required to replace a component in a scrollpane.
Then once you get it working in a simple program you look to what is different in your real program. Like I said we don't have time to read through all that code.
maybe adding of mouselistener
Thats easy to check. Just add a println(..) statement in the listener to see if the code is executed.
or anywhere else??
A common problem is having two variable reference different scrollpanes. So maybe you have a class variable and an instance variable of the same name. Get rid of the instance variable.
i tried your trick of writing the minimal possible code which does what i want it to ....and it has worked ....would be posting a solution asap of my original problem so that i can contribute to this forum cheers:)