Multiple JWindows

From: Fahd Shariff (fahdshariff_at_yahoo.com)
Date: 06/21/04


Date: 21 Jun 2004 06:47:01 -0700

Why doesnt the code below display two jwindows where i want them? It
just shows both of them on top of each other. If i use JFrames
instead, everything works beautifully...
        
        JWindow window = new JWindow() ;
          window.getContentPane().add(new JLabel("HELLO1")) ;
          window.setSize(100,100) ;
          window.setLocation(100,100) ; //<---------------------
          window.setVisible(true) ;
          System.out.println("created window 1");

          JWindow window2 = new JWindow() ;
          window2.getContentPane().add(new JLabel("HELLO2")) ;
          window2.setSize(100,100) ;
          window2.setLocation(100,200) ; //<---------------------
          window2.setVisible(true) ;
          System.out.println("created window 2");

Thanks in advance,

-- 
Fahd Shariff
http://www.fahdshariff.cjb.net
"Let the code do the talking..."


Relevant Pages

  • Re: Multiple JWindows
    ... > Why doesnt the code below display two jwindows where i want them? ... Mike W ...
    (comp.lang.java.gui)
  • Re: Multiple JWindows
    ... >> Why doesnt the code below display two jwindows where i want them? ... > It should produce two contiguous windows the second directly below the ...
    (comp.lang.java.gui)
  • Re: Does this mean DMD is dying?
    ... the display is showing trouble. ... power them ALL at the same time; but during an image that doesnt need ... too many dots lit up it works fine. ...
    (rec.games.pinball)
  • Re: Java start new Process (Browser) and notice when Browser Window is closed.
    ... doesnt exist anymore (Browser Window closed from the user), ... of the 'display of a web page' - is that not the real intent ...
    (comp.lang.java.help)
  • Re: OT really cute video
    ... A better quality video of the piece is here: http://members.cox.net/transam57/lights.wmv and it doesnt have the demeaning caption to it. ... Im not crazy about the display, and I will be forever grateful its not at my neighbors house, but it is spectacular, and the folks who spent all those hours setting it up dont deserve to have their efforts trivialized the way the google sight did. ...
    (rec.crafts.textiles.quilting)

Loading