forum  

[Forum] JDialog with an applet

List for Users of Carlsbad Cubes' Technologies and Products
Tue, 01 Nov 2005 08:26:50 -0800

I'd like my application to run both as a client as well as an applet. As 
a client, the JFrame and subequent JDialog  frames successfully display. 
As an applet, the main JApplet displays correctly, using 
SwingEngine.insert(xxx, japplet) (with the patch). However, the applet 
cannot display the JDialog correctly  because the variables that are 
supposed to be automatically assigned is not happening. I'm not sure if 
I'm supposed to use SwingEngine.render or insert. As an aside, 
_swix.test() does display the JDialog applet correctly.

Any help would be appreciated. Thanks.

public class Find {
SwingEngine _swix = new SwingEngine(this);
JDialog          _dialog; // should be automatically assigned

public Find(URL url)
{
    try {
        _swix.render(url);
    } catch (Exception e) {    e.printStackTrace(System.out); }


//    _swix.test() -- this *works*
    if (_dialog == null)
        D.fatal("only happens when an applet");
...
    _dialog.pack();
    _dialog.setVisible(true);
}
/* XML file
<?xml version="1.0" encoding="UTF-8"?>
<dialog id="_dialog" title = "${dlg.find.title}" modal="true" 
bundle="org.buschman.share.Bundle" 
defaultCloseOperation="JFrame.HIDE_ON_CLOSE">
*/


_______________________________________________
Forum mailing list
Forum@carlsbadcubes.com
http://carlsbadcubes.com/mailman/listinfo/forum_carlsbadcubes.com