List of usage examples for java.awt.event HierarchyEvent consume
protected void consume()
From source file:com.all.browser.impl.MozillaBrowser.java
private void registerListeners() { mozillaPanel.addHierarchyBoundsListener(new HierarchyBoundsAdapter() { @Override// w w w . j av a 2s.c om public void ancestorResized(HierarchyEvent e) { Container changedParent = e.getChangedParent(); if (changedParent != null) { mozillaPanel.setBounds(changedParent.getBounds()); } } }); mozillaPanel.addKeyListener(new KeyAdapter() { @Override public void keyPressed(KeyEvent e) { int keyCode = e.getKeyCode(); if (keyCode == KeyEvent.VK_SPACE) { e.consume(); } } }); }