Java Code Examples for java.awt.event.ComponentEvent#getComponent()

The following examples show how to use java.awt.event.ComponentEvent#getComponent() . 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: Regression_117699_swing.java    From birt with Eclipse Public License 1.0 5 votes vote down vote up
public void componentMoved( ComponentEvent cev )
{
	JFrame jf = (JFrame) cev.getComponent( );
	Rectangle r = jf.getBounds( );
	setLocation( r.x, r.y + r.height );
	setSize( r.width, 50 );
}
 
Example 2
Source File: Regression_116630_swing.java    From birt with Eclipse Public License 1.0 5 votes vote down vote up
public void componentShown( ComponentEvent cev )
{
	JFrame jf = (JFrame) cev.getComponent( );
	Rectangle r = jf.getBounds( );
	setLocation( r.x, r.y + r.height );
	setSize( r.width, 50 );
	setVisible( true );
}
 
Example 3
Source File: Regression_136077_swing.java    From birt with Eclipse Public License 1.0 5 votes vote down vote up
public void componentMoved( ComponentEvent cev )
{
	JFrame jf = (JFrame) cev.getComponent( );
	Rectangle r = jf.getBounds( );
	setLocation( r.x, r.y + r.height );
	setSize( r.width, 50 );
}
 
Example 4
Source File: Regression_139388_swing.java    From birt with Eclipse Public License 1.0 5 votes vote down vote up
public void componentResized( ComponentEvent cev )
{
	JFrame jf = (JFrame) cev.getComponent( );
	Rectangle r = jf.getBounds( );
	setLocation( r.x, r.y + r.height );
	setSize( r.width, 50 );
}
 
Example 5
Source File: bug8071705.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void componentShown(ComponentEvent e) {
    JFrame frame = (JFrame) e.getComponent();

    runActualTest(device, latch, frame, result);

    frame.setVisible(false);
    frame.dispose();
    latch.countDown();
}
 
Example 6
Source File: SwingHighlightViewer.java    From birt with Eclipse Public License 1.0 5 votes vote down vote up
public void componentResized( ComponentEvent cev )
{
	JFrame jf = (JFrame) cev.getComponent( );
	Rectangle r = jf.getBounds( );
	setLocation( r.x, r.y + r.height );
	setSize( r.width, 50 );
}
 
Example 7
Source File: Regression_117699_swing.java    From birt with Eclipse Public License 1.0 5 votes vote down vote up
public void componentResized( ComponentEvent cev )
{
	JFrame jf = (JFrame) cev.getComponent( );
	Rectangle r = jf.getBounds( );
	setLocation( r.x, r.y + r.height );
	setSize( r.width, 50 );
}
 
Example 8
Source File: bug8071705.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void componentShown(ComponentEvent e) {
    JFrame frame = (JFrame) e.getComponent();

    runActualTest(device, latch, frame, result);

    frame.setVisible(false);
    frame.dispose();
    latch.countDown();
}
 
Example 9
Source File: Regression_142687_swing.java    From birt with Eclipse Public License 1.0 5 votes vote down vote up
public void componentMoved( ComponentEvent cev )
{
	JFrame jf = (JFrame) cev.getComponent( );
	Rectangle r = jf.getBounds( );
	setLocation( r.x, r.y + r.height );
	setSize( r.width, 50 );
}
 
Example 10
Source File: Regression_117880_swing.java    From birt with Eclipse Public License 1.0 5 votes vote down vote up
public void componentResized( ComponentEvent cev )
{
	JFrame jf = (JFrame) cev.getComponent( );
	Rectangle r = jf.getBounds( );
	setLocation( r.x, r.y + r.height );
	setSize( r.width, 50 );
}
 
Example 11
Source File: Regression_119808.java    From birt with Eclipse Public License 1.0 5 votes vote down vote up
public void componentMoved( ComponentEvent cev )
{
	JFrame jf = (JFrame) cev.getComponent( );
	Rectangle r = jf.getBounds( );
	setLocation( r.x, r.y + r.height );
	setSize( r.width, 50 );
}
 
Example 12
Source File: FormatChartsViewer.java    From birt with Eclipse Public License 1.0 5 votes vote down vote up
public void componentMoved( ComponentEvent cev )
{
	JFrame jf = (JFrame) cev.getComponent( );
	Rectangle r = jf.getBounds( );
	setLocation( r.x, r.y + r.height );
	setSize( r.width, 50 );
}
 
Example 13
Source File: DataChartsViewer.java    From birt with Eclipse Public License 1.0 5 votes vote down vote up
public void componentMoved( ComponentEvent cev )
{
	JFrame jf = (JFrame) cev.getComponent( );
	Rectangle r = jf.getBounds( );
	setLocation( r.x, r.y + r.height );
	setSize( r.width, 50 );
}
 
Example 14
Source File: SwingInteractivityViewer.java    From birt with Eclipse Public License 1.0 5 votes vote down vote up
public void componentResized( ComponentEvent cev )
{
	JFrame jf = (JFrame) cev.getComponent( );
	Rectangle r = jf.getBounds( );
	setLocation( r.x, r.y + r.height );
	setSize( r.width, 50 );
}
 
Example 15
Source File: Regression_116627_swing.java    From birt with Eclipse Public License 1.0 5 votes vote down vote up
public void componentMoved( ComponentEvent cev )
{
	JFrame jf = (JFrame) cev.getComponent( );
	Rectangle r = jf.getBounds( );
	setLocation( r.x, r.y + r.height );
	setSize( r.width, 50 );
}
 
Example 16
Source File: Regression_137780_swing.java    From birt with Eclipse Public License 1.0 5 votes vote down vote up
public void componentShown( ComponentEvent cev )
{
	JFrame jf = (JFrame) cev.getComponent( );
	Rectangle r = jf.getBounds( );
	setLocation( r.x, r.y + r.height );
	setSize( r.width, 50 );
	setVisible( true );
}
 
Example 17
Source File: Regression_127619_swing.java    From birt with Eclipse Public License 1.0 5 votes vote down vote up
public void componentShown( ComponentEvent cev )
{
	JFrame jf = (JFrame) cev.getComponent( );
	Rectangle r = jf.getBounds( );
	setLocation( r.x, r.y + r.height );
	setSize( r.width, 50 );
	setVisible( true );
}
 
Example 18
Source File: Regression_139388_swing.java    From birt with Eclipse Public License 1.0 5 votes vote down vote up
public void componentMoved( ComponentEvent cev )
{
	JFrame jf = (JFrame) cev.getComponent( );
	Rectangle r = jf.getBounds( );
	setLocation( r.x, r.y + r.height );
	setSize( r.width, 50 );
}
 
Example 19
Source File: SwingHighlightViewer.java    From birt with Eclipse Public License 1.0 5 votes vote down vote up
public void componentShown( ComponentEvent cev )
{
	JFrame jf = (JFrame) cev.getComponent( );
	Rectangle r = jf.getBounds( );
	setLocation( r.x, r.y + r.height );
	setSize( r.width, 50 );
	setVisible( true );
}
 
Example 20
Source File: MainPanel.java    From java-swing-tips with MIT License 4 votes vote down vote up
@Override public void componentResized(ComponentEvent e) {
  JFrame frame = (JFrame) e.getComponent();
  if (frame.getExtendedState() == Frame.NORMAL) {
    dim.setSize(frame.getContentPane().getSize());
  }
}