Component.java (show): Set visible to true before showing the peer.

2004-01-21  Thomas Fitzsimmons  <fitzsim@redhat.com>

	* java/awt/Component.java (show): Set visible to true before
	showing the peer.

From-SVN: r76325
This commit is contained in:
Thomas Fitzsimmons 2004-01-22 00:22:27 +00:00 committed by Thomas Fitzsimmons
parent ed78a9fd7c
commit 75ef0594a3
2 changed files with 11 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2004-01-21 Thomas Fitzsimmons <fitzsim@redhat.com>
* java/awt/Component.java (show): Set visible to true before
showing the peer.
2004-01-21 Kim Ho <kho@redhat.com>
* gnu/java/awt/peer/gtk/GtkFramePeer.java (postConfigureEvent):

View File

@ -869,9 +869,14 @@ public abstract class Component
*/
public void show()
{
// We must set visible before showing the peer. Otherwise the
// peer could post paint events before visible is true, in which
// case lightweight components are not initially painted --
// Container.paint first calls isShowing () before painting itself
// and its children.
this.visible = true;
if (peer != null)
peer.setVisible(true);
this.visible = true;
}
/**