Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!feeder.news-service.com!94.75.214.39.MISMATCH!aioe.org!.POSTED!not-for-mail From: "John B. Matthews" Newsgroups: comp.lang.java.programmer Subject: Re: JlayeredPane in netbeans Date: Sat, 02 Apr 2011 10:41:52 -0400 Organization: The Wasteland Lines: 35 Message-ID: References: NNTP-Posting-Host: LQJtZWzu+iKlBROuDg+IUg.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: MT-NewsWatcher/3.5.3b3 (Intel Mac OS X) X-Notice: Filtered by postfilter v. 0.8.2 Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:2753 In article , mukesh tiwari wrote: > Thank you for your reply, but this is not fulfilling the purpose > because texts are deformed in second case. I don't know if I > understand the JLayeredPane fully, but what in my mind is [this]: I > added two components [ jeditorpane and jtextarea ] in jLayeredpane in > same Default_Layer and use the function moveTofront and moveToback to > move these components in same layer. When jeditorpane will be in > front position then it will hide all the contents of jtextarea and > vice- versa. It's like dynamically changing the components position > in layer, but I don't think this is happening. LayeredPane is intended to show overlapping components simultaneously, as might be seen in JDesktopPane: To show "different components at different times," CardLayout might be a better choice: As an aside, I found it helpful to explore individual components using manual layouts before advancing to multiple, nested components in a GUI editor: -- John B. Matthews trashgod at gmail dot com