Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.gui > #3222
| From | "Hal Vaughan" <hal.vaughan@THRWHITE.remove-dii-this> |
|---|---|
| Subject | Re: Duplicating and Swapp |
| Message-ID | <u4%wj.26011$6h7.21846@trnddc04> (permalink) |
| Newsgroups | comp.lang.java.gui |
| References | <47c47a5e$0$28625$7836cce5@newsrazor.net> |
| Date | 2011-04-27 15:43 +0000 |
| Organization | TDS.net |
To: comp.lang.java.gui Daniel Pitts wrote: > Hal Vaughan wrote: >> I have an unusual situation that would most easily be solved by being >> able to duplicate a JTextArea in size and position, then to swap between >> them by making each visible at different times. >> >> I know I can duplicate the JTextArea with clone() and I can get the size >> to >> make sure they match. If I were working with an absolute layout, I know >> I could position them both at the same place and switch between them by >> making one visible while the other isn't. However, I'll be working with >> other layouts types and I don't have access to the container the first >> one is in. >> >> Is there some fairly easy way I can duplicate the first JTextArea and >> swap the two in and out without messing up other components or the >> display? >> >> Thanks! >> >> Hal >> >> > Look at java.awt.CardLayout I was thinking that might work, but I was hoping for something easier. I figure I'd have to remove the original component, put in a panel with the CardLayout, then add both other components. Hal --- * 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 | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Duplicating and Swapping "Hal Vaughan" <hal.vaughan@THRWHITE.remove-dii-this> - 2011-04-27 15:43 +0000
Re: Duplicating and Swapp "Daniel Pitts" <daniel.pitts@THRWHITE.remove-dii-this> - 2011-04-27 15:43 +0000
Re: Duplicating and Swapp "Hal Vaughan" <hal.vaughan@THRWHITE.remove-dii-this> - 2011-04-27 15:43 +0000
Re: Duplicating and Swapp "Roedy Green" <roedy.green@THRWHITE.remove-dii-this> - 2011-04-27 15:43 +0000
csiph-web