Rob Camick wrote:
Cl_Main mainform = new Cl_Main();
What is that code for. Get rid of it.
on Cl_main there's a desktoppane, i want the internalframe attached inside.
Rob Camick wrote:I gave you a link to the Swing tutorial for a reason. I don't know why you are changing the code so dramatically.
If you want to add a label to the internal frame, then add the label when you create the internal frame.
i've tried your code and still didn't work
Rob Camick wrote: I also have no idea what all this code is for:
i am intended to use the code above as my label to be printed on jpanel inside Jinternalframe
Rob Camick wrote: The class already is a JFrame, there is no need to create a new JFrame.
You can't use setContentPane() twice. The desktop pane is the content pane for the JFrame. If you replace the content pane with another panel, then you no longer have a desktop pane to add internal frames to.
take a look at the following picture,
my internalframe still move exceeding the desktoppane
and here's my current code