Why this happen?

i have an application that doesn't update on the fly(update an internalframe), why is that happen?
the window that you see is the Jinternalframe that i add Jpanel on its.
my code is to complex so i explane with pictures.
this the step:
1. this is the first pic that i have no do nothing
http://www.geocities.com/amir_limx/1.jpg
2.this the the second pic that i press next button (>>)
http://www.geocities.com/amir_limx/2.jpg //my mouse still in the internalframe area
3. this the third pic that my mouse mouse out from the internal frame
http://www.geocities.com/amir_limx/3.jpg
the Jinternaframe is change when my mouse move out from Jinternalframe, why this happen??

i have call revalidate, this my part code:
I have a main Jframe (mainframe) and a main Jpanel (mainpanel)
mainframe,getContentPane().add(mainpanel);
mainpanel.add(ThumbFrame);
ThumbFrame is the Jinternalframe
ThumbButton is the Jpanel
ThumbButton.box is the Box // i add the Box to Jpanel
ThumbButton.ArrImage is the Jbutton // i add Jbutton to Box
ThumbFrame.remove(ThumbButton);
ThumbButton.removeAll();
ThumbFrame.revalidate();
ThumbButton.box = null;
ThumbButton.ArrImage = null;
ThumbButton = null;
ThumbcurrentPos++;
ThumbButton = new thumbnail();
ThumbButton.setSize(new Dimension(950, 650));
ThumbFrame.getContentPane().add(ThumbButton);     
ThumbButton.requestFocus();
ThumbButton.revalidate();
ThumbFrame.revalidate();

Similar Messages

Maybe you are looking for