![]() |
|
Модераторы: LSD, AntonSaburov |
![]()
|
|
| bara |
|
|||
|
Новичок Профиль Группа: Участник Сообщений: 17 Регистрация: 20.2.2007 Репутация: нет Всего: нет |
Создаю простой класс JDialog с таким кодом:
Текс "Before setVisible" выводиться сразу, а все, что после метода setVisible(true), выполняется только после закрытия окна. Что не так? Или так и должно быть? |
|||
|
||||
| Sleepy_PIP |
|
|||
|
Опытный ![]() ![]() Профиль Группа: Участник Сообщений: 512 Регистрация: 30.6.2004 Где: Moscow Репутация: нет Всего: 12 |
вот что говорит документация:
JDialog->awt.Dialog setVisible public void setVisible(boolean b) Shows or hides this Dialog depending on the value of parameter b. Overrides: setVisible in class Window Parameters: b - if true, makes the Dialog visible, otherwise hides the Dialog. If the dialog and/or its owner are not yet displayable, both are made displayable. The dialog will be validated prior to being made visible. If false, hides the Dialog and then causes setVisible(true) to return if it is currently blocked. Notes for modal dialogs. setVisible(true): If the dialog is not already visible, this call will not return until the dialog is hidden by calling setVisible(false) or dispose. setVisible(false): Hides the dialog and then returns on setVisible(true) if it is currently blocked. It is OK to call this method from the event dispatching thread because the toolkit ensures that other events are not blocked while this method is blocked. See Also: акцент: setVisible(true): If the dialog is not already visible, this call will not return until the dialog is hidden by calling setVisible(false) or dispose. setVisible(false): Hides the dialog and then returns on setVisible(true) if it is currently blocked. It is OK to call this method from the event dispatching thread because the toolkit ensures that other events are not blocked while this method is blocked. так что вроде бы все правильно, нет? -------------------- -- Sleepy_PIP. Pavel Pryazhentsev (ex. 2:5020/141) "... Лучше быть нужным, чем свободным ..." |
|||
|
||||
| bara |
|
|||
|
Новичок Профиль Группа: Участник Сообщений: 17 Регистрация: 20.2.2007 Репутация: нет Всего: нет |
все ясно, спасибо
|
|||
|
||||
![]()
|
| Правила форума "Java" | |
|
|
Если Вам помогли, и атмосфера форума Вам понравилась, то заходите к нам чаще! С уважением, LSD, AntonSaburov, powerOn, jk1. |
| 0 Пользователей читают эту тему (0 Гостей и 0 Скрытых Пользователей) | |
| 0 Пользователей: | |
| « Предыдущая тема | Java: GUI и Java FX приложения | Следующая тема » |
|
|
По вопросам размещения рекламы пишите на vladimir(sobaka)vingrad.ru
Отказ от ответственности Powered by Invision Power Board(R) 1.3 © 2003 IPS, Inc. |