• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 321
  • Last Modified:

Repaint Problem

Basically I have two componets that extend JPanel.  One is for graphs (called GraphPanel)and the other is a drop down container (called SelectionPanel).  When I resize the applet (running with appletviewer) the only time the SelectionPanel repaints itself is when I click on it.

How can I set this up so that it repaints on resize ?

John Clarke
0
johnclarke
Asked:
johnclarke
1 Solution
 
zhongbingCommented:
Don't mix swing conponents and AWT compents. if you didn't mix them, post more code.

0
 
sgomsCommented:
u can use validate() on ur container
post ur code
0
 
OviCommented:
....., or repaint()&updateUI(), or implement a event listener for window events and call this methods. What Layout did you use ? Did you ? Because at the usage of any default Layout, the update is made automatically.
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now