Hey, I'm rather new to GUI and ran into the following problem:
I extended the JInternalFrame class so that it contains a JSplitPane. The lower pane has only a JFrame that I also extended in order to override the update() and paint() methods.
Now, if I draw something and resize the internal frame that contains the extended JFrame, my drawing simply disappears. It flickers a bit while I'm resizing but it isn't there when I release the mouse button.
Also, if I have more internal frames and move one of them around all the drawings overlap and appear on the upper-most internal frame. It just looks like hell...
I've tried adding some listeners but nothing has worked so far.
You can't add a JFrame to any Swing component so that doesn't make sense.
a JFrame that I also extended in order to override the update() and paint() methods.
You should never do that. Overriding those methods is an old AWT trick and should NOT be used with Swing. Instead you override the paintComponent() method of a JPanel (or JComponent) and add the component to the frame. Read the section from the Swing tutorial on Custom Painting for more information at examples.
If you need more help you should create a SSCCE, that demonstrates the incorrect behaviour.
Don't forget to use the Code Formatting Tags so the posted code retains its original formatting. That is done by selecting the code and then clicking on the "Code" button above the question input area.