aboutsummaryrefslogtreecommitdiffstats
path: root/src/newt
diff options
context:
space:
mode:
Diffstat (limited to 'src/newt')
-rw-r--r--src/newt/classes/jogamp/newt/WindowImpl.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/newt/classes/jogamp/newt/WindowImpl.java b/src/newt/classes/jogamp/newt/WindowImpl.java
index f0abd9625..a8e93d428 100644
--- a/src/newt/classes/jogamp/newt/WindowImpl.java
+++ b/src/newt/classes/jogamp/newt/WindowImpl.java
@@ -2038,7 +2038,7 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
}
public MouseListener[] getMouseListeners() {
- return (MouseListener[]) mouseListeners.toArray();
+ return mouseListeners.toArray(new MouseListener[mouseListeners.size()]);
}
protected void consumeMouseEvent(MouseEvent e) {
@@ -2128,7 +2128,7 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
}
public KeyListener[] getKeyListeners() {
- return (KeyListener[]) keyListeners.toArray();
+ return keyListeners.toArray(new KeyListener[keyListeners.size()]);
}
private final boolean propagateKeyEvent(KeyEvent e, KeyListener l) {
@@ -2216,7 +2216,7 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
}
public WindowListener[] getWindowListeners() {
- return (WindowListener[]) windowListeners.toArray();
+ return windowListeners.toArray(new WindowListener[windowListeners.size()]);
}
protected void consumeWindowEvent(WindowEvent e) {