Need to call super.paintComponent() for painting to work properly.

git-svn-id: https://samskivert.googlecode.com/svn/trunk@256 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
mdb
2001-08-13 23:43:09 +00:00
parent 467ae03b3a
commit eee679513e
@@ -1,5 +1,5 @@
// //
// $Id: VizPanel.java,v 1.3 2001/08/12 04:36:57 mdb Exp $ // $Id: VizPanel.java,v 1.4 2001/08/13 23:43:09 mdb Exp $
// //
// viztool - a tool for visualizing collections of java classes // viztool - a tool for visualizing collections of java classes
// Copyright (C) 2001 Michael Bayne // Copyright (C) 2001 Michael Bayne
@@ -42,6 +42,8 @@ public class VizPanel extends JPanel
public void paintComponent (Graphics g) public void paintComponent (Graphics g)
{ {
super.paintComponent(g);
Graphics2D gfx = (Graphics2D)g; Graphics2D gfx = (Graphics2D)g;
Rectangle2D bounds = getBounds(); Rectangle2D bounds = getBounds();
_viz.layout(gfx, 0, 0, bounds.getWidth(), bounds.getHeight()); _viz.layout(gfx, 0, 0, bounds.getWidth(), bounds.getHeight());