JPanel als GroupLayout verwenden
lima-city → Forum → Programmiersprachen → Java
- 
Diskutiere mit und stelle Fragen: Jetzt kostenlos anmelden! lima-city: Gratis werbefreier Webspace für deine eigene Homepage 
- 
    
    Weiß zwar gerade nicht welche Version du verwendet aber ich beziehe mich mal auf das JavaDoc von Java 7:
 
 setLayout ist von java.awt.Container vererbt:
 public void setLayout(LayoutManager mgr) Sets the layout manager for this container. This method changes layout-related information, and therefore, invalidates the component hierarchy.
 validate kommt auch vom Container:
 public void validate() Validates this container and all of its subcomponents. Validating a container means laying out its subcomponents. Layout-related changes, such as setting the bounds of a component, or adding a component to the container, invalidate the container automatically.
 Also versuch mal validate aufzurufen, damit das Panel neu gerendert wird...
- 
Diskutiere mit und stelle Fragen: Jetzt kostenlos anmelden! lima-city: Gratis werbefreier Webspace für deine eigene Homepage