Because swing is a desktop programming framework. It is not used in web
applications. It is not used in Wicket applications. It only knows how to
open windows using the computer's windowing system - the computer that it is
on. It does not know how to generate HTML or know anything about HTTP.
If you want a confirm dialog in a web app, you need to use javascript.
<script>confirm('Are you really sure that you are programming a web
app?');</script> This will open on the client computer.
--
Jeremy Thomerson
http://www.wickettraining.com
On Mon, Apr 13, 2009 at 4:04 AM, Vladimir Zavada <[email protected]> wrote:
> I tested it on two computers and it really does not work.
> I have a delete button with confirmation dialog
> javax.swing.JOptionPane.showConfirmDialog. So I started my application on
> laptop no1 where Glassfish v3 server is running and then I started it on
> laptop no2 where I clicked on the delete button and to my surprise the
> confirmation dialog did not show on laptop no2 where it should have showed
> but it showed on laptop no1. :)
>
> So the verdict is do not use javax.swing.JOptionPane in your wicket
> applications. :)
>
> Vlado
>
> Martin Voigt wrote / napĂsal(a):
>
>> I'm not sure if I understand this right, are you talking about
>>
>> javax.swing.JOptionPane? While wicket shares some concepts with swing
>> and maybe the TreeModel classes, it has nothing to do with swing
>> except both are loosely based on the same principles, event driven
>> etc. So no, you cannot use swing components in a wicket application,
>> except you are talking about embedding an applet or something, which
>> would be a bad idea from my POV.
>>
>> But maybe I misunderstood you.
>>
>> bw,
>> Martin
>>
>> 2009/4/11 Vladimir Zavada <[email protected]>:
>>
>>
>>> I have a question about using JOptionPane dialogs in my wicket
>>> application.
>>> Is it safe to use them? Is it better to use javascript alert or
>>> JOptionPane
>>> dialog?
>>>
>>> thx for your opinion
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [email protected]
>>> For additional commands, e-mail: [email protected]
>>>
>>>
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>>
>>
>>
>
>