Path: csiph.com!x330-a1.tempe.blueboxinc.net!feeder1.hal-mli.net!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!novia!news-out.readnews.com!transit3.readnews.com!news-out.news.tds.net!newsreading01.news.tds.net!86597e80!not-for-mail From: "James" Subject: Re: design of gui Message-ID: <45a2de42$0$4889$4c368faf@roadrunner.com> X-Comment-To: comp.lang.java.gui Newsgroups: comp.lang.java.gui In-Reply-To: <1145252626.258741.222850@j33g2000cwa.googlegroups.com> References: <1145252626.258741.222850@j33g2000cwa.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: 37 Date: Wed, 27 Apr 2011 15:28:28 GMT NNTP-Posting-Host: 96.60.20.240 X-Complaints-To: news@tds.net X-Trace: newsreading01.news.tds.net 1303918108 96.60.20.240 (Wed, 27 Apr 2011 10:28:28 CDT) NNTP-Posting-Date: Wed, 27 Apr 2011 10:28:28 CDT Organization: TDS.net Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.gui:602 To: comp.lang.java.gui raam wrote: > hi all, > I am trying to write a GUI program which will show different images in > the background and foreground.The images shown depend on the user > inputs.I am presently using JFRames, JPanels and all to do > these.Somtimes the images are to be very frequently changed and > sometimes we require to toggle between some images.I am using JFrames > and Swings components .We have a JDesktop pane in which the background > and foregroud images are shown.The desktop pane knows which screen is > present at the moment and it has a button to shift between previouss > and next screens.I request you to please tell whether this is the right > approach or should I use applets and threads to avoid any difficulties > in future.If you feel this is a stupid question please leave it.I > request you to please help. > Raam > What you might find helpful is JLayeredPane. Put each image in a layer, and rotate the z-order of the layers. It also has convenience methods like: * moveToBack(Component c) * moveToFront(Component c) * add(component c,int index)) * remove(int index) * setLayer(Component c, int layer). For more info see: http://java.sun.com/j2se/1.5.0/docs/api/index.html -AND- http://java.sun.com/docs/books/tutorial/uiswing/components/layeredpane.html --- * 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