Updating a JFrame with a new panel

Hi,
i want to switch a JPanel placed in my JFrame. But if i do so, i always have to maximize the window and then bring it back again, to see the changes work completely.
I tried both repaint() and validate() but both do not work that I always have to maximize the window to see the changes.
Can anybody help me to solve this?
Thanks for answers in advance!

I don't know exactly what you mean by switching a JPanel.
You might want to read the CardLayout tutorial:
http://java.sun.com/docs/books/tutorial/uiswing/layout/card.html
If you replace a JPanel you need to call revalidate on the parent of the JPanel you are replacing.
If you want further help post a Short, Self Contained, Compilable and Executable, Example Program ([url http://homepage1.nifty.com/algafield/sscce.html]SSCCE) that demonstrates the problem.
And don't forget to use [url http://forum.java.sun.com/help.jspa?sec=formatting]code formatting when posting code.

Similar Messages

Maybe you are looking for

  • Ipod does not work with new usb

    i got my computer cleaned and a usb 2.0 pci card put in and now my ipod does not work with it, can anyone help

  • IDE Channel Problem?

    Some background...my computer went down because the motherboard went out.  I installed a new one and it was DOA...so I went with an MSI 865PE Neo2-PFS (Platinum Edition).  I got it up and running and everything is great except I get the following...

  • IMac 2012 Electric specifications

    Hi, I'm looking for the right UPS to supply to 5 iMac 21", 1 time capsule, 1T external HD. Neighter I could find the VA electrical specifications for the new iMac 21". Can u help me? thanx

  • Sorting in Expansion

    Hi, I would like to make an expansion of the account members, sorting the output based on the content of the account dimension property Table_Sorting. Has anybody tried doing it using the EVENE and MDX sorting instruction ORDER? Can you please share

  • Color flash in FLV files on Mac?

    Ran into a strange bug where FLVs (played back via the netStream method) will flash a frame of color (usually red or green, but sometimes other colors) for a split second before the video starts. This only happens on Macs, and usually only if one vid