Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.gui > #2930

Re: Setting z-index in Sw

Path csiph.com!x330-a1.tempe.blueboxinc.net!feeder1.hal-mli.net!news.glorb.com!news-out.readnews.com!news-xxxfer.readnews.com!news-out.news.tds.net!newsreading01.news.tds.net!86597e80!not-for-mail
From "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this>
Subject Re: Setting z-index in Sw
Message-ID <7d650bee364bb@uwe> (permalink)
X-Comment-To comp.lang.java.gui
Newsgroups comp.lang.java.gui
In-Reply-To <6dd368ff-e469-4792-ae64-05bdc934d990@a35g2000prf.googlegroups.com>
References <6dd368ff-e469-4792-ae64-05bdc934d990@a35g2000prf.googlegroups.com>
Content-Type text/plain; charset=IBM437
Content-Transfer-Encoding 8bit
X-Gateway time.synchro.net [Synchronet 3.15a-Win32 NewsLink 1.92]
Lines 43
Date Wed, 27 Apr 2011 15:41:58 GMT
NNTP-Posting-Host 96.60.20.240
X-Complaints-To news@tds.net
X-Trace newsreading01.news.tds.net 1303918918 96.60.20.240 (Wed, 27 Apr 2011 10:41:58 CDT)
NNTP-Posting-Date Wed, 27 Apr 2011 10:41:58 CDT
Organization TDS.net
Xref x330-a1.tempe.blueboxinc.net comp.lang.java.gui:2930

Show key headers only | View raw


  To: comp.lang.java.gui
Mohammad Javad Dousti wrote:
..
>1-I'm using absolute layout ..

Why? *

> ..in Java. 

Using absolute layouts is a bad idea in an X-plat, 
X-plaf, multi-VM language.

>..I want to set the z-index of my
>component after adding them. 

* What is this GUI that requires absolutely positioned,
overlapping components?  Some types of GUIs might be
better suited to a CardLayout that shows any one GUI
element (usually a panel with many other panels and
widgets inside it) a JTabbedPane or a JDesktopPane.

>..How can I do so?

Why do you want to do so?

>2-How can I get the X and Y of an added component in absolut layout?

One way would be to remember where you absolutely 
placed it in the first place (I would guess).  But also, 
you might try these methods listed in the JavaDocs
java.awt.Component.getLocation(java.awt.Point)
(as well as getX(), and getY() ).

-- 
Andrew Thompson
http://www.physci.org/

Message posted via http://www.javakb.com

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

Back to comp.lang.java.gui | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Setting z-index in Swing "Mohammad Javad Dousti" <mohammad.javad.dousti@THRWHITE.remove-dii-this> - 2011-04-27 15:41 +0000
  Re: Setting z-index in Sw "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> - 2011-04-27 15:41 +0000
    Re: Setting z-index in Sw "Mohammad Javad Dousti" <mohammad.javad.dousti@THRWHITE.remove-dii-this> - 2011-04-27 15:41 +0000
      Re: Setting z-index in Sw "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> - 2011-04-27 15:41 +0000
        Re: Setting z-index in Sw "Chase Preuninger" <chase.preuninger@THRWHITE.remove-dii-this> - 2011-04-27 15:42 +0000

csiph-web