I'm creating a small chatting-program in Java (yes I know hundreds of
programs of this kind already exist ;) ), and I've got a problem with my
dialogs.
When I click on the "close" button, they are not destructed, but hidden.
Great, that's exactly what I want, because later I want them to
eventually appear again, and unchanged.
But when I tell them to come back, the following happens. The first time, I see
the dialog "flashing" for half a second, and disappear again. Then, nothing
happens anymore.
So what do I have to do to get my dialogs back ?
Thanks in advance,
Pierric Descamps.
Hi again !
I wanted to add the following:
This bug only happens with Linux ! Windows users of my program have no
problem ! On the same principle, I can't write any " ? " or " ' ",
whereas they can. Also, no "cut-and-paste" !
Do you know why there are so many bugs? Are they being fixed ?
Pierric.
>Also, no "cut-and-paste" !
That's because Applets haven't got access to the clipboard
(unfortunately for me too) :/
--
Venlig hilsen / Best regards
Martin Mouritzen - mar...@eisenstein.dk
Eisenstein - http://www.eisenstein.dk
That is a bug in Sun's (And Blackdown's IIRC) JDK for Linux. Occurs only
with some Window managers - not with others. I think they work OK under
KDE. The window actually ends up getting minimized. Sun says this should
be fixed in the next version (I don't know if the current Merlin beta
release fixes this)
Using dispose() instead of setVisible(false)/hide() is the only
workaround.
BK
> Using dispose() instead of setVisible(false)/hide() is the only
> workaround.
Actually I use show() to bring the window back, and I leave the default
behaviour for the close button. I'm not sure, but I think it's a
"dispose" behaviour, isn't it? If not, can you explain me how it goes?
The doc is not so clear for me on that point.
Thanks,
Pierric.
I've seen it with e, window maker and IceWM ifmy memory serves me right.
Sun's stand on this is that the JDK is tested only under KDE - so other
window managers are not supported.
In one of the bug reports at Sun, there was some talk of some AWT code
being re-written to support more window managers for the Merlin final
release. So hopefully we might see some fixes at least in the final
releases of 1.4
>> Using dispose() instead of setVisible(false)/hide() is the only
>> workaround.
>Actually I use show() to bring the window back, and I leave the default
>behaviour for the close button. I'm not sure, but I think it's a
>"dispose" behaviour, isn't it? If not, can you explain me how it goes?
>The doc is not so clear for me on that point.
The default behaviour for the Close button is to just hide the window.
So you'll need to trap the WindowClosing event and put in a dispose()
call there - (And also in any other code that hides the window). Once
you do this, the show() call will work right.
BK