powered by simpleCommunicator - 2.0.61     © 2026 Programmizd 02
Целевая тема:
Создать новую тему:
Автор:
Закрыть
Цитировать
Форумы / Java [игнор отключен] [закрыт для гостей] / Подавление закрытия JWindow
2 сообщений из 2, страница 1 из 1
Подавление закрытия JWindow
    #33991806
artgonch
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Здравствуйте.
Подскажите, как сделать так, чтобы окно типа JWindow не реагировало на закрытие (нажатие клавишь Alt+F4). У JFrame есть метод setDefaultCloseOperation(), а вот у JWindow я ничего подобного не нашел.
Заранее спасибо.
...
Рейтинг: 0 / 0
Подавление закрытия JWindow
    #33994012
Jozic
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
java.awt.event.WindowListener
Код: plaintext
1.
2.
3.
4.
5.
6.
7.
    /**
     * Invoked when the user attempts to close the window
     * from the window's system menu.  If the program does not 
     * explicitly hide or dispose the window while processing 
     * this event, the window close operation will be cancelled.
     */
     public   void  windowClosing(WindowEvent e);
+

java.awt.Window
Код: plaintext
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
    /**
     * Adds the specified window listener to receive window events from
     * this window.
     * If l is null, no exception is thrown and no action is performed.
     *
     * @param 	l the window listener
     * @see #removeWindowListener
     * @see #getWindowListeners
     */ 
     public   synchronized   void  addWindowListener(WindowListener l) {
...
Рейтинг: 0 / 0
2 сообщений из 2, страница 1 из 1
Форумы / Java [игнор отключен] [закрыт для гостей] / Подавление закрытия JWindow
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


Просмотр
0 / 0
Close
Debug Console [Select Text]