Java Code Examples for java.awt.event.ComponentEvent#COMPONENT_RESIZED
The following examples show how to use
java.awt.event.ComponentEvent#COMPONENT_RESIZED .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Window.java From Bytecoder with Apache License 2.0 | 5 votes |
/** * Dispatches an event to this window or one of its sub components. * @param e the event */ void dispatchEventImpl(AWTEvent e) { if (e.getID() == ComponentEvent.COMPONENT_RESIZED) { invalidate(); validate(); } super.dispatchEventImpl(e); }
Example 2
Source File: PicMap.java From megamek with GNU General Public License v2.0 | 5 votes |
@Override protected void processComponentEvent(ComponentEvent e) { switch (e.getID()) { case ComponentEvent.COMPONENT_RESIZED: onResize(); update(); break; } }
Example 3
Source File: MainPanel.java From java-swing-tips with MIT License | 4 votes |
@Override protected void processComponentEvent(ComponentEvent e, JLayer<? extends JScrollPane> l) { Component c = e.getComponent(); if (e.getID() == ComponentEvent.COMPONENT_RESIZED && c instanceof JTableHeader) { l.repaint(c.getBounds()); } }