Re: Duplicating and Swapping Out A Component



On Tue, 26 Feb 2008 17:11:25 GMT, Hal Vaughan <hal@xxxxxxxxxxx> wrote,
quoted or indirectly quoted someone who said :

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?
how about do the layout with one. do a getBounds on it and do a
setBounds on the invisible other. Then change the visibility and
trigger a repaint.

When it comes time to flip back, reverse the roles. You don't freeze
the layout with SetMinimum/Maxium/Preferred size to leave it free to
flex except when flipping.

I have flipped using setVisible(). JDisplay does this to flip between
the colour and B&W copy-pastable versions.
However, I have not tried the trick I described.
--

Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com
.



Relevant Pages

  • Re: Conditional formatting
    ... happens if you step through the script in Script Debugger? ... I'd like to dynamically place a button on my layout. ... I only want the "Show All" button to display when I'm ... calculation determining how the button is labelled and describing what ...
    (comp.databases.filemaker)
  • Re: Not seeing Indent options when I place my cursor on the ruler
    ... no tips display, but the did display in Print Layout. ... [MVP] ... it says another kind of indent which I forget. ...
    (microsoft.public.word.docmanagement)
  • Conditional formatting
    ... I'd like to dynamically place a button on my layout. ... at the list of current projects (showing only projects that aren't ... So my report should show one of two buttons for each ... I just don't want to display both buttons for each record ...
    (comp.databases.filemaker)
  • Re: How to display a variables state
    ... I place a globa on the layout and set the field to ... the variable at various breakpoints. ... How do you display the current state of a variable in a text box ... layout and have FileMaker 8.5 Advanced perform variable substitution ...
    (comp.databases.filemaker)
  • Re: Conditional formatting
    ... I'd like to dynamically place a button on my layout. ... at the list of current projects (showing only projects that aren't ... I just don't want to display both buttons for each record ... calculations and portalls for every field you want to have checked. ...
    (comp.databases.filemaker)