Java Code Examples for java.awt.event.WindowEvent

The following are top voted examples for showing how to use java.awt.event.WindowEvent. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to generate more good examples.
Example 1
Project: incubator-netbeans   File: MenuWarmUpTask.java   View source code 6 votes vote down vote up
@Override
public void windowDeactivated(WindowEvent e) {
    // proceed only if switching to external application
    if (e.getOppositeWindow() == null) {
        synchronized (rp) {
            if (task != null) {
                task.cancel();
            } else {
                task = rp.create(this);
            }
            LOG.fine("Window deactivated, preparing refresh task");
        }
        if (UILOG.isLoggable(Level.FINE)) {
            LogRecord r = new LogRecord(Level.FINE, "LOG_WINDOW_DEACTIVATED"); // NOI18N
            r.setResourceBundleName("org.netbeans.core.ui.warmup.Bundle"); // NOI18N
            r.setResourceBundle(NbBundle.getBundle(MenuWarmUpTask.class)); // NOI18N
            r.setLoggerName(UILOG.getName());
            UILOG.log(r);
        }
    }
}
 
Example 2
Project: smile_1.5.0_java7   File: FontChooser.java   View source code 6 votes vote down vote up
/**
 *  Show font selection dialog.
 *  @param parent Dialog's Parent component.
 *  @return OK_OPTION, CANCEL_OPTION or ERROR_OPTION
 *
 *  @see #OK_OPTION 
 *  @see #CANCEL_OPTION
 *  @see #ERROR_OPTION
 **/
public int showDialog(Component parent) {
    dialogResultValue = ERROR_OPTION;
    JDialog dialog = createDialog(parent);
    dialog.addWindowListener(new WindowAdapter() {

        @Override
        public void windowClosing(WindowEvent e) {
            dialogResultValue = CANCEL_OPTION;
        }
    });

    dialog.setVisible(true);
    dialog.dispose();
    dialog = null;

    return dialogResultValue;
}
 
Example 3
Project: OpenJSharp   File: Font2DTest.java   View source code 6 votes vote down vote up
private void loadComparisonPNG( String fileName ) {
    try {
        BufferedImage image =
            javax.imageio.ImageIO.read(new File(fileName));
        JFrame f = new JFrame( "Comparison PNG" );
        ImagePanel ip = new ImagePanel( image );
        f.setResizable( false );
        f.getContentPane().add( ip );
        f.addWindowListener( new WindowAdapter() {
            public void windowClosing( WindowEvent e ) {
                ( (JFrame) e.getSource() ).dispose();
            }
        });
        f.pack();
        f.show();
    }
    catch ( Exception ex ) {
        fireChangeStatus( "ERROR: Failed to Load PNG File; See Stack Trace", true );
        ex.printStackTrace();
    }
}
 
Example 4
Project: call-IDE   File: VerifyEmail.java   View source code 6 votes vote down vote up
/**
   * Creates new form Submission_Login
   */
  public VerifyEmail() {
      client = new Client();
      boolean conCheck = client.connectServer();
      if(!conCheck) {
          dispose();
      }
      else {
          this.setVisible(true);
      }
addWindowListener(new WindowAdapter() {
	@Override
	public void windowClosing(WindowEvent e) {
		client.closeConnection();
	}
});
      initComponents();
      confirmVerifCodeButton.setEnabled(false);
      
  }
 
Example 5
Project: Dise-o-2017   File: ControladorGestionarTipoImpuesto.java   View source code 6 votes vote down vote up
public void mostrarPantallaModificacionEmpresa(Object object,String cuitEmpresa){
    DTOTipoImpuesto dtoTi = obtenerTipoImpuesto((int) object);
    if (dtoTi != null) {
        IUGestionarTipoImpuestoModificarEmpresa pantallaModificarEmpresa = new IUGestionarTipoImpuestoModificarEmpresa(cuitEmpresa);
        pantallaModificarEmpresa.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE); // Evito que se cierre al presionar x
        pantallaModificarEmpresa.setVisible(true); // La hago visible
        // Modifico la operaciĆ³n de cierre para volver a la pantalla principal
        pantallaModificarEmpresa.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
        pantallaModificarEmpresa.addWindowListener(new WindowAdapter() {
            public void windowClosing(WindowEvent ev) {
                iniciar();
            }
        });
        pantallaModificarEmpresa.setNombre_actual(dtoTi.getNombreDTOTipoImpuesto());
        pantallaModificarEmpresa.setTextfield_nombre(dtoTi.getNombreDTOTipoImpuesto());
        pantallaModificarEmpresa.setCheckbox_esEditable(dtoTi.isEsMontoEditableDTOTipoImpuesto());
        if (dtoTi.getFechaHoraInhabilitacionDTOTipoImpuesto() == null) {
            pantallaModificarEmpresa.setCheckbox_Habilitar(true);
        } else {
            pantallaModificarEmpresa.setCheckbox_Habilitar(false);
        }
    }
}
 
Example 6
Project: jdk8u-jdk   File: JFrame.java   View source code 6 votes vote down vote up
/**
 * Processes window events occurring on this component.
 * Hides the window or disposes of it, as specified by the setting
 * of the <code>defaultCloseOperation</code> property.
 *
 * @param  e  the window event
 * @see    #setDefaultCloseOperation
 * @see    java.awt.Window#processWindowEvent
 */
protected void processWindowEvent(final WindowEvent e) {
    super.processWindowEvent(e);

    if (e.getID() == WindowEvent.WINDOW_CLOSING) {
        switch (defaultCloseOperation) {
            case HIDE_ON_CLOSE:
                setVisible(false);
                break;
            case DISPOSE_ON_CLOSE:
                dispose();
                break;
            case EXIT_ON_CLOSE:
                // This needs to match the checkExit call in
                // setDefaultCloseOperation
                System.exit(0);
                break;
            case DO_NOTHING_ON_CLOSE:
            default:
        }
    }
}
 
Example 7
Project: JavaGraph   File: ExploreAction.java   View source code 6 votes vote down vote up
/**
 * Creates a modal dialog that will interrupt this thread, when the
 * cancel button is pressed.
 */
private JDialog createCancelDialog() {
    JDialog result;
    // create message dialog
    JOptionPane message = new JOptionPane(
        isAnimated() ? getAnimationPanel()
            : new Object[] {getStateCountLabel(), getTransitionCountLabel()},
        JOptionPane.PLAIN_MESSAGE);
    message.setOptions(new Object[] {getCancelButton()});
    result = message.createDialog(getFrame(), "Exploring state space");
    result.pack();
    result.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
    result.addWindowListener(new WindowAdapter() {
        @Override
        public void windowClosing(WindowEvent e) {
            ExploreThread.this.interrupt();
        }
    });
    result.setAlwaysOnTop(true);
    return result;
}
 
Example 8
Project: incubator-netbeans   File: PluginManagerUI.java   View source code 6 votes vote down vote up
@Override
public void addNotify () {
    super.addNotify ();
    //show progress for initialize method
    final Window w = findWindowParent ();
    if (w != null) {
        w.addWindowListener (new WindowAdapter (){
            @Override
            public void windowOpened (WindowEvent e) {
                final WindowAdapter waa = this;
                setWaitingState (true);
                Utilities.startAsWorkerThread (PluginManagerUI.this,
                        new Runnable () {
                            @Override
                            public void run () {
                                try {
                                    initTask.waitFinished ();
                                    w.removeWindowListener (waa);
                                } finally {
                                    setWaitingState (false);
                                }
                            }
                        },
                        NbBundle.getMessage (PluginManagerUI.class, "UnitTab_InitAndCheckingForUpdates"),
                        Utilities.getTimeOfInitialization ());
            }
        });
    }
    HelpCtx.setHelpIDString (this, PluginManagerUI.class.getName ());
    tpTabs.addChangeListener (new ChangeListener () {
        @Override
        public void stateChanged (ChangeEvent evt) {
            HelpCtx.setHelpIDString (PluginManagerUI.this, getHelpCtx ().getHelpID ());
        }
    });
}
 
Example 9
Project: liin   File: Applet.java   View source code 6 votes vote down vote up
public final void init() {
    frame = new Frame();

    frame.add(this);
    frame.setMenuBar(null);
    frame.setPreferredSize(new Dimension(400, 400));
    frame.setVisible(true);

    frame.addWindowListener(new WindowAdapter() {
        public void windowClosing(WindowEvent e) {
            System.exit(0);
        }
    });

    frame.pack();

    onStart();

    thread = new Thread(this);
    thread.start();

    imageBuffer = createImage(getWidth(), getHeight());
}
 
Example 10
Project: AquamarineLake   File: MainFrame.java   View source code 6 votes vote down vote up
public MainFrame()
{
    setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
    setPreferredSize(new Dimension(640, 480));

    cap = new VideoCapture(0);

    addWindowListener(new WindowAdapter() {
        @Override
        public void windowClosing(WindowEvent e) {
            super.windowClosing(e);
            cap.release();
            System.exit(0);
        }
    });

    p = new DrawPanel();
    add(p);

    pack();

    setVisible(true);
}
 
Example 11
Project: UpdateBuilder   File: MainFrame.java   View source code 6 votes vote down vote up
/**
 * Create the frame.
 */
public MainFrame() {
	addWindowListener(new WindowAdapter() {
		@Override
		public void windowClosing(WindowEvent e) {
			exitApp();
		}
	});
	instance = this;
	projectData = new ProjectData();

	chooser.setFileFilter(filter);

	UpdateChecker.checkForUpdate();

	initialize();
}
 
Example 12
Project: AI-RRT-Motion-Planning   File: Visualiser.java   View source code 6 votes vote down vote up
public static void main(String[] args) {
	JFrame frame = new JFrame("Assignment 1 visualiser");
	Visualiser vis = new Visualiser(frame);
	if (args.length > 0) {
		vis.loadProblem(new File(args[0]));
		if (vis.hasProblem() && args.length >= 2) {
			vis.loadSolution(new File(args[1]));
		}
	}
	frame.setSize(700, 766);
	frame.setLocation(300, 100);
	frame.addWindowListener(new WindowAdapter() {
		public void windowClosing(WindowEvent e) {
			System.exit(0);
		}
	});
	frame.setVisible(true);
}
 
Example 13
Project: bitnym   File: MainClass.java   View source code 6 votes vote down vote up
/**
 * @param args
 */
public static void main(String[] args) {
	
	
	final BitNymWallet bitwallet = new BitNymWallet();
	BitNymGui gui = new BitNymGui(bitwallet);
	gui.loadWalletListener();
	
	gui.setMinimumSize(new Dimension(800, 450));
	gui.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
	gui.setVisible(true);
	gui.addWindowListener(new WindowAdapter() {
		@Override
		public void windowClosing(WindowEvent e) {
			bitwallet.exit();
		}
	});

}
 
Example 14
Project: Open-DM   File: InitialImportFilePanel.java   View source code 6 votes vote down vote up
public static void main(String[] args) {
    // just test this panel.
    CopyJob copyJob = new CopyJob();
    copyJob.setListFile(new File("/home/bioakimidis/ibm/readme.txt"));
    InitialImportFilePanel p = new InitialImportFilePanel(copyJob);

    JFrame f = new JFrame();
    f.add(p);
    f.pack();
    f.setLocation(100, 800);
    f.setSize(new Dimension(700, 500));
    f.addWindowListener(new WindowAdapter() {
        public void windowClosing(WindowEvent e) {
            System.exit(0);
        }
    });
    f.setVisible(true);

}
 
Example 15
Project: Proyecto-DASI   File: VisualizacionJfreechart.java   View source code 6 votes vote down vote up
public void showJFreeChart(int coordX, int coordY){
        //Mostrar el chart
        ChartPanel chartPanel = new ChartPanel(chart1);
        chartPanel.setPreferredSize(new java.awt.Dimension(500, 270));
        setContentPane(chartPanel);           
                
        this.setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);               
        
        addWindowListener(
        		new WindowAdapter(){
        		        public void WindowClosing (WindowEvent e){
                           System.out.println("No quiero cerrar la ventana !!!\n");
        		        }	
        		}
        );

        
        this.pack();
//        RefineryUtilities.centerFrameOnScreen(this);
        
        this.setLocation(coordX, coordY);
        
        this.setVisible(true);    	    	
    }
 
Example 16
Project: POPBL_V   File: Controller.java   View source code 6 votes vote down vote up
private void mainProgram() {
	this.setTitle("Walkie-Talkie");
	this.setIconImage(new ImageIcon(References.LOGO_IMAGE).getImage());
	this.setContentPane(mainWindow());
	this.setPreferredSize(new Dimension(References.WIDTH_WINDOW, References.HEIGHT_WINDOW));
	this.setResizable(false);
	this.pack();
	this.setLocationRelativeTo(null);
	this.addWindowListener(new WindowAdapter() {
		@Override
		public void windowClosing(WindowEvent e) {
			closeApplication();
		}
	});
	this.setVisible(true);
}
 
Example 17
Project: OpenJSharp   File: JFrame.java   View source code 6 votes vote down vote up
/**
 * Processes window events occurring on this component.
 * Hides the window or disposes of it, as specified by the setting
 * of the <code>defaultCloseOperation</code> property.
 *
 * @param  e  the window event
 * @see    #setDefaultCloseOperation
 * @see    java.awt.Window#processWindowEvent
 */
protected void processWindowEvent(final WindowEvent e) {
    super.processWindowEvent(e);

    if (e.getID() == WindowEvent.WINDOW_CLOSING) {
        switch (defaultCloseOperation) {
            case HIDE_ON_CLOSE:
                setVisible(false);
                break;
            case DISPOSE_ON_CLOSE:
                dispose();
                break;
            case EXIT_ON_CLOSE:
                // This needs to match the checkExit call in
                // setDefaultCloseOperation
                System.exit(0);
                break;
            case DO_NOTHING_ON_CLOSE:
            default:
        }
    }
}
 
Example 18
Project: freecol   File: FullScreenFrameListener.java   View source code 5 votes vote down vote up
/**
 * Invoked when the window gets iconified.
 *
 * @param event The event that has information on the action.
 */
@Override
public void windowIconified(WindowEvent event) {
    // Counter Java misbehaviour of minimizing JFrame when opening JDialog,
    // causing bug #2729. Sadly, it may take a split second.
    // See https://bugs.openjdk.java.net/browse/JDK-6770428
    // TODO: Don't just hide the symptom, prevent hitting the trigger.
    // TODO: Minimize side effect of also undoing Alt+Tab and similar,
    // if there are complaints. Maybe remember number of open dialogs
    // and/or time since using one, then test for it here.
    frame.setExtendedState(JFrame.NORMAL);
}
 
Example 19
Project: jdk8u-jdk   File: ContainerFocusAutoTransferTest.java   View source code 5 votes vote down vote up
public void init() {
    robot = Util.createRobot();
    kfm = KeyboardFocusManager.getCurrentKeyboardFocusManager();
    Toolkit.getDefaultToolkit().addAWTEventListener(new AWTEventListener() {
        public void eventDispatched(AWTEvent event) {
            System.out.println("--> " + event);
        }
    }, FocusEvent.FOCUS_EVENT_MASK | WindowEvent.WINDOW_FOCUS_EVENT_MASK);
}
 
Example 20
Project: Luyten4Forge   File: FindAllBox.java   View source code 5 votes vote down vote up
private void setSaveWindowPositionOnClosing() {
	this.addWindowListener(new WindowAdapter() {
		@Override
		public void windowDeactivated(WindowEvent e) {
			WindowPosition windowPosition = ConfigSaver.getLoadedInstance().getFindWindowPosition();
			windowPosition.readPositionFromDialog(FindAllBox.this);
		}
	});
}
 
Example 21
Project: powertext   File: MatchedBracketPopup.java   View source code 5 votes vote down vote up
private boolean checkForParentWindowEvent(WindowEvent e) {
	if (e.getSource()==getParent()) {
		uninstallAndHide();
		return true;
	}
	return false;
}
 
Example 22
Project: parabuild-ci   File: DatabaseManager.java   View source code 5 votes vote down vote up
/**
 * Method declaration
 *
 *
 * @param ev
 */
public void windowClosing(WindowEvent ev) {

    try {
        if (cConn != null) {
            cConn.close();
        }
    } catch (Exception e) {}

    fMain.dispose();

    if (bMustExit) {
        System.exit(0);
    }
}
 
Example 23
Project: Luyten4Forge   File: FindBox.java   View source code 5 votes vote down vote up
private void setSaveWindowPositionOnClosing() {
	this.addWindowListener(new WindowAdapter() {
		@Override
		public void windowDeactivated(WindowEvent e) {
			WindowPosition windowPosition = ConfigSaver.getLoadedInstance().getFindWindowPosition();
			windowPosition.readPositionFromDialog(FindBox.this);
		}
	});
}
 
Example 24
Project: ACHelper   File: TestCaseDialog.java   View source code 5 votes vote down vote up
TestCaseDialog(Frame parent, TestCase testCase) {
    super(parent, true);
    this.testCase = testCase;
    setTitle("Test case " + testCase.getName());
    setContentPane(rootPanel);
    setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);
    addWindowListener(new WindowAdapter() {
        public void windowClosing(WindowEvent evt) {
            confirmAndClose();
        }
    });

    inputTextArea.setText(testCase.getInput());
    expectedOutputTextArea.setText(testCase.getExpectedOutput());
    programOutputTextArea.setText(testCase.getProgramOutput());
    inputTextArea.getDocument().addDocumentListener(inputListener);
    expectedOutputTextArea.getDocument().addDocumentListener(answerListener);

    saveButton.addActionListener(event -> saveAndClose());
    discardButton.addActionListener(event -> confirmAndClose());
    solvedCheckBox.addActionListener(event -> {
        boolean solved = solvedCheckBox.isSelected();
        saveButton.setEnabled(somethingChanged());
        expectedOutputTextArea.setText(solved ? testCase.getProgramOutput() : testCase.getExpectedOutput());
        expectedOutputTextArea.setEnabled(!solved);
    });
    setupShortcuts();

    pack();
    setLocationRelativeTo(parent);
}
 
Example 25
Project: incubator-netbeans   File: Main.java   View source code 5 votes vote down vote up
/**
 * If there isn't one bring up a terminal running vi and have it
 * go to the given file and lineno.
 */
static void showInEditor(String file, int lineno) {
    if (file == null)
        return;

    if (editorTerminal == null) {
        Program program = new Command("vi");
        editorTerminal = new Terminal(executor(), termType, program, false, rows, cols);

        editorTerminal.addWindowListener(new WindowAdapter() {
            @Override
            public void windowClosed(WindowEvent e) {
                editorTerminal = null;
                currentFile = "";
            }
        });

        injector = new Injector();
        editorTerminal.term().pushStream(injector);

        Thread thread = new Thread(editorTerminal);
        thread.start();

        // Give it some time to come up otherwise it's not receptive
        try {
            Thread.sleep(1000);
        } catch (InterruptedException ex) {
            Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
        }
    }

    if (!file.equals(currentFile)) {
        injector.inject("" + (char) 27 + ":e " + file + "\r\n");
        currentFile = file;
    }
    injector.inject("" + (char) 27 + lineno + "G");
}
 
Example 26
Project: VASSAL-src   File: PrivateChatManager.java   View source code 5 votes vote down vote up
public PrivateChatter getChatterFor(final Player sender) {
  if (banned.contains(sender)) {
    return null;
  }
  PrivateChatter chat = null;
  int index = chatters.indexOf(new Entry(sender, null));
  if (index >= 0) {
    chat = chatters.get(index).chatter;
  }
  if (chat == null) {
    chat = new PrivateChatter(sender, client);
    chatters.add(new Entry(sender, chat));

    final JFrame f = new JFrame();
    f.addWindowListener(new WindowAdapter() {
      public void windowClosing(WindowEvent e) {
        promptToBan(sender);
      }
    });

    f.setTitle(Resources.getString("Chat.private_channel", sender.getName())); //$NON-NLS-1$
    f.setJMenuBar(MenuManager.getInstance().getMenuBarFor(f));
    f.getContentPane().add(chat);
    f.pack();
    f.setLocation(Toolkit.getDefaultToolkit().getScreenSize().width / 2 -
                  f.getSize().width / 2, 0);
  }
  return chat;
}
 
Example 27
Project: incubator-netbeans   File: SheetTableTest.java   View source code 5 votes vote down vote up
public void windowOpened(WindowEvent e) {
    shown = true;
    synchronized(this) {
        //System.err.println("window opened");
        notifyAll();
        ((JFrame) e.getSource()).removeWindowListener(this);
    }
}
 
Example 28
Project: geomapapp   File: MapApp.java   View source code 5 votes vote down vote up
protected void initLayerManager() {

		JFrame d = new JFrame();
		d.addWindowListener(new WindowAdapter() {
			public void windowClosing(WindowEvent e) {
				((JCheckBoxMenuItem)(XML_Menu.commandToMenuItemHash.get("layer_manager_cmd"))).setSelected(false);
			}
		});
		LayerManager lm;
		
		//use existing layer manager if it already exists
		if (layerManager != null) {
			lm = layerManager;
		} else {
			lm = new LayerManager();
		}
		
		lm.setLayerList( toLayerList(map.overlays) );
		lm.setMap(map);

		lm.setDialog(d);
		JScrollPane sp = new JScrollPane(lm);
		sp.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
		d.setTitle("Layer Manager");
		d.setContentPane(sp);
//		d.getContentPane().add(sp);
		d.pack();
		d.setSize(new Dimension(lm.getPreferredSize().width+20,lm.getPreferredSize().height+55));
		d.setMaximumSize(new Dimension(400,300));

		d.setDefaultCloseOperation(JDialog.HIDE_ON_CLOSE);
		d.setLocationRelativeTo(frame);
		d.setState(Frame.NORMAL);
		d.setAlwaysOnTop(true);
		this.layerManager = lm;
		this.layerManagerDialog = d;	
	}
 
Example 29
Project: parabuild-ci   File: DatabaseManager.java   View source code 5 votes vote down vote up
public void windowClosing(WindowEvent ev) {

        try {
            if (cConn != null) {
                cConn.close();
            }
        } catch (Exception e) {}

        fMain.dispose();

        if (bMustExit) {
            System.exit(0);
        }
    }
 
Example 30
Project: incubator-netbeans   File: ZOrderManager.java   View source code 5 votes vote down vote up
public void windowActivated(WindowEvent e) {
    logger.entering(getClass().getName(), "windowActivated");

    WeakReference<RootPaneContainer> ww = getWeak((RootPaneContainer)e.getWindow());
    if (ww != null) {
        // place as last item in zOrder list
        zOrder.remove(ww);
        zOrder.add(ww);
    } else {
        throw new IllegalArgumentException("Window not attached: " + e.getWindow()); //NOI18N
    }
}
 
Example 31
Project: jdk8u-jdk   File: ServiceDialog.java   View source code 5 votes vote down vote up
/**
 * Initialize "page setup" dialog
 */
void initPageDialog(int x, int y,
                     PrintService ps,
                     DocFlavor flavor,
                     PrintRequestAttributeSet attributes)
{
    this.psCurrent = ps;
    this.docFlavor = flavor;
    this.asOriginal = attributes;
    this.asCurrent = new HashPrintRequestAttributeSet(attributes);

    Container c = getContentPane();
    c.setLayout(new BorderLayout());

    pnlPageSetup = new PageSetupPanel();
    c.add(pnlPageSetup, BorderLayout.CENTER);

    pnlPageSetup.updateInfo();

    JPanel pnlSouth = new JPanel(new FlowLayout(FlowLayout.TRAILING));
    btnApprove = createExitButton("button.ok", this);
    pnlSouth.add(btnApprove);
    getRootPane().setDefaultButton(btnApprove);
    btnCancel = createExitButton("button.cancel", this);
    handleEscKey(btnCancel);
    pnlSouth.add(btnCancel);
    c.add(pnlSouth, BorderLayout.SOUTH);

    addWindowListener(new WindowAdapter() {
        public void windowClosing(WindowEvent event) {
            dispose(CANCEL);
        }
    });

    getAccessibleContext().setAccessibleDescription(getMsg("dialog.pstitle"));
    setResizable(false);
    setLocation(x, y);
    pack();
}
 
Example 32
Project: jvb   File: MainWindow.java   View source code 5 votes vote down vote up
@Override
protected void processWindowEvent(WindowEvent e) {
    super.processWindowEvent(e);
    if (e.getID() == WINDOW_CLOSING) {
        open = false;
    }
}
 
Example 33
Project: jaer   File: HyperTerminal.java   View source code 5 votes vote down vote up
/** Creates new form HyperTerminal */
public HyperTerminal() {
    initComponents();

    addWindowListener(new WindowAdapter() {

        @Override
        public void windowClosing(WindowEvent e) {
            super.windowClosing(e);
            HyperTerminal.this.close();
        }
    });
    openPort();
}
 
Example 34
Project: KivaBot   File: StopAtWindowCloseListener.java   View source code 4 votes vote down vote up
@Override
public void windowDeiconified(final WindowEvent event) {
	// Nothing to do yet
}
 
Example 35
Project: OpenJSharp   File: XWindowPeer.java   View source code 4 votes vote down vote up
public void handleStateChange(int oldState, int newState) {
    postEvent(new WindowEvent((Window)target,
                              WindowEvent.WINDOW_STATE_CHANGED,
                              oldState, newState));
}
 
Example 36
Project: incubator-netbeans   File: DiffActionTooltipWindow.java   View source code 4 votes vote down vote up
@Override
public void windowLostFocus(WindowEvent e) {
    if (actionsWindow != null && e.getOppositeWindow() == null) {
        shutdown();
    }
}
 
Example 37
Project: JAddOn   File: JLogger.java   View source code 4 votes vote down vote up
@Override
public void windowIconified(WindowEvent e) {
}
 
Example 38
Project: incubator-netbeans   File: ZOrderManager.java   View source code 4 votes vote down vote up
public void windowDeactivated(WindowEvent e) {
}
 
Example 39
Project: SER316-Aachen   File: EventDialog.java   View source code 4 votes vote down vote up
public void windowClosing( WindowEvent e ) {
    CANCELLED = true;
    this.dispose();
}
 
Example 40
Project: WordnetLoom   File: PanelWorkbench.java   View source code 4 votes vote down vote up
@Override
public void windowActivated(WindowEvent arg0) {
}