diff options
Diffstat (limited to 'libjava/classpath/gnu/java/awt/peer/gtk/GtkPanelPeer.java')
-rw-r--r-- | libjava/classpath/gnu/java/awt/peer/gtk/GtkPanelPeer.java | 33 |
1 files changed, 3 insertions, 30 deletions
diff --git a/libjava/classpath/gnu/java/awt/peer/gtk/GtkPanelPeer.java b/libjava/classpath/gnu/java/awt/peer/gtk/GtkPanelPeer.java index 88bb715694d..51fe2bc8e0c 100644 --- a/libjava/classpath/gnu/java/awt/peer/gtk/GtkPanelPeer.java +++ b/libjava/classpath/gnu/java/awt/peer/gtk/GtkPanelPeer.java @@ -39,9 +39,7 @@ exception statement from your version. */ package gnu.java.awt.peer.gtk; import java.awt.AWTEvent; -import java.awt.Graphics; import java.awt.Panel; -import java.awt.event.ComponentEvent; import java.awt.event.MouseEvent; import java.awt.event.PaintEvent; import java.awt.peer.PanelPeer; @@ -59,35 +57,10 @@ public class GtkPanelPeer extends GtkContainerPeer public void handleEvent(AWTEvent event) { int id = event.getID(); - switch (id) - { - case MouseEvent.MOUSE_PRESSED: - awtComponent.requestFocusInWindow(); - break; - case PaintEvent.UPDATE: - case PaintEvent.PAINT: - { - try - { - Graphics g = getGraphics(); - if (! awtComponent.isShowing() || awtComponent.getWidth() < 1 - || awtComponent.getHeight() < 1 || g == null) - return; - g.setClip(((PaintEvent) event).getUpdateRect()); - - // Do not want to clear anything before painting.); - awtComponent.paint(g); - - g.dispose(); - return; - } - catch (InternalError e) - { - System.err.println(e); - } - } - } + if (id == MouseEvent.MOUSE_PRESSED) + awtComponent.requestFocusInWindow(); + super.handleEvent(event); } |