Just a simple layout question ;)

Hi,
I just want to create a panel (panel got border layout) where the center panel contain a JScrollPane...
the east panel contain a JScrollPane too - now i want to synchronize the layout i.e. the height of both
scroll panes ... i.e. if the size of the ground panel change, the height of both scroll panes should change
in the same way ...
Now I don't want to add a component listener to update the east scroll pane every time the center scroll
panes scroll pane change it's height ... so any solutions using a default layout manager?
regards,
Olek

Olek wrote:
Ok,
Thank you for the replies.
The problem is a little bit more complex.
The east panel is a JXCollapsiblePane from SwingX.
The collapsible container got VerticalLayout. The contaning JPanel got BorderLayout.
Now i want to add a JScrollPane centered at this panel. The scrollpane is layed out with
the preferred size of the JPanel - ok.
The problem is, that there is much unused space below
the scroll pane. This results of the preferred size of the JPanel ... now
i want to synchronize the preferred size of the JPanel on the east with the JScrollPane
of the center component of the ground panel.
I actually try to add a component listener... but this is not the solution I prefer...
OlekSo why do you post a question with missing information?
This is a specific question related to the components you're using.
I can't help you unless you post a SSCCE that demonstrates the problem.

Similar Messages

  • Simple Layout Question

    I need to create an application with the following layout properties:
    a) It's always in the 4;3 ratio with default size of 800x600 and resizeable from 640x480 to 1024x768
    b) It needs to be divided into left side that takes up 20% of space and right side that takes up 80% of space.
    c) Left and right sides are to be independent rectangular areas within which widgets can be docked.
    What is the simplest way for a noob ( : me : ) to do this?
    Thanks.

    Set the layout property of the Application to horizontal
    If your using Flex 3, use <mx:Canvas /> tags
    If using Flex 4, use <s:Group /> tags
    Here's a Flex 4 example:;
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx"
         width="800" height="600" >
         <s:layout>
              <s:HorizontalLayout />
         </s:layout>
         <s:Group width="20%" />
         <s:Group width="80%" />
    </s:Application>

  • Just a simple RSS question

    Why does my RSS feed not work.
    http://madisoncountyjournal.com/ftp/cast2/Madison%20County%20Journal/Madison%20C ounty%20Journal.html

    What did you type in the box when it asked for your url when you published to a folder? It looks like you might have included "index.html". That should not be there I think.
    If you republish your site, you might want to consider changing the names of your site and your page inside iWeb to something short and simple and without spaces instead of "Madison County Journal, " like "mcj" for the site and "welcome" for the page. That way your url won't be so long and won't repeat the same stuff 3 times.

  • Simple layout question, shrinking TextField and TextArea inside VBox

    Given:
            VBox root = new VBox(10);
            root.getChildren().addAll(new TextField(), new TextArea());
            Scene scene = new Scene(root, 300, 250);When I shrink the application window vertically, the textfield starts to shrink first, while the text area stays its size, then when the textfield is only a narrow strip, the text area starts to shrink.
    1) Is this expected?
    2) Is it by design? If so, why?
    3) How can I avoid it, i.e. have the text area shrink first, then the textfield?
    It think the behaviour in 3) makes more sense, since a text area by its nature can have different heights; a text field on the other hand I would expect to have the height of a single line of text unless there is absolutely no space for it in its container. It doesn't make sense to have a textfield that is a fraction of the height of a line of text.
    I have tried various combinations of minHeight and prefHeight, but without luck.

    Hey,
    1) Yes, this is expected!
    2) Yes, why.. well I don't know why the minimum height of a TextField is smaller than the pref size.
    3) This can be avoid by setting your own sizes (min size - pref size - max size)
            VBox root = new VBox(10);
            root.setStyle("-fx-background-color: lightgray");
            TextField tf = new TextField();
            tf.setMinHeight(Control.USE_PREF_SIZE); //the minimum height = the preferred height
            TextArea ta = new TextArea();
            ta.setMinHeight(30);
            ta.setPrefHeight(50);
            ta.setMaxHeight(Double.MAX_VALUE); //maximum height, depends on the parent
            VBox.setVgrow(ta, Priority.ALWAYS); //use the maximum height available
            root.getChildren().addAll(tf, ta);
            Scene scene = new Scene(root, 300, 250);Edited by: FXdude on 21-jan-2013 6:13

  • CSS layout question regarding browser sizing

    Hi,
    Basically I want the basis of my site to be - A header, Main content with a background image, A Footer.
    I'm having problems however, I can't seem to get my footer to position where I want it i.e. at the bottom of the browser window at all times. I'm doing it as an AP div and how it should work is that it's fixed at the bottom of the page and then if the user resizes their browser in the y direction the footer moves up with it, over the top of the main content (but not the header which will have a higher z-index).
    The way I THOUGHT to do it was to firstly create a div tag for the whole page (780 pixels wide, auto left and right margins, auto height) and then inside that put my ap div header fixed height at the top and have another ap div as the footer, fixed height and tell it to position 0 pixels from the bottom. However this doesn't seem to do the trick, I'm sure I'm missing something really really simple. Anyone who's vaguely familiar with the program will be able to answer this I'm sure. If my question isn't clear please let me know and I'll rephrase,
    Ta

    There is no reason to use APDivs for such a simple layout.  Default CSS positioning (which is no positioning at all) is typically all you need for most layouts.  Build your HTML markup logically from top to bottom of page and your footer will naturally appear at page bottom.
    Live Demo (view page source to see the code)
    http://alt-web.com/TEMPLATES/Basic-1-col-fixed.html
    Or, for a Sticky Footer using Fixed positioning:
    http://alt-web.com/DEMOS/CSS2-Sticky-Footer.shtml
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    http://alt-web.com/
    http://twitter.com/altweb
    http://alt-web.blogspot.com

  • Simple/silly question: how do I set/change default font/color for outgoing mail messages?

    Simple/silly question: how do I set/change default font/color for outgoing mail messages?

    Just a suggestion..........
    Download Thunderbird.  Easier to use when it comes to what you want to do w/your emails. 

  • (CSS) Can this simple layout idea be better coded?

    Hi guys,
    I'm trying to build a very simple layout made slightly more complex via a background gradient that needs to be in sync with the foreground image.
    http://vilverset.com/murray.php
    As you can see, the layout is supposing a 1000px wide viewport, or bigger. The foreground image is 650px wide, and the text column next to it is 350px wide. This fills up our 1000px viewport.
    Now, normally, I would just apply the image as a background to the text column's container (and make that container 1000px wide), except that there are a few conditions to this layout that make that solution ill-advised.
    When there's enough content to fill it, the text column needs to stretch from the top to the bottom of the viewport, and trigger the main browser vertical scrollbar when exceeding this window.
    When there isn't enough content to fill the length of the column, the content should be vertically centered.
    The image on the left of the column should be vertically centered at all times, or it will lose its sync with the site's background gradient.
    The image on the left of the column should never scroll with the content. It should be fixated.
    The combination of the image and column should be centered in the viewport (both axis).
    You've seen how I did it @ the link above. Div class "image" has the main image as a background, and this image is padded to extend to fill the whole 1000px width of the site layout. It's the only way I could think of to offset the image from the center spot. Ditto the text column, which is in a 350px wide div, that has a 650px left side margin (totalling 1000px).
    The main negative side-effect of this method occurs when you reduce the viewport to less that 1000px in width. The image starts moving AWAY from the column (as you can see by trying it out at the link above).
    If there's a better way to get that image and that column into position, and the combination of both centered on the screen in both axis... I'm willing to try it!

    I'm glad you're pleased with your layout.     I'm having a few problems with it.
    When viewed on a narrow screen such as an iPhone in landscape mode, your image moves leftwards out of view.  And when device is scrolled horizontally to see content, text collides with the image.  Is this what you want to have happen? (see screenshot)
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    http://alt-web.com/
    http://twitter.com/altweb
    mjyeager wrote:
    You tell me these things can't be done, but I've got foreground JPGs with gradients perfectly in sync with the background gradient, and neither of them scrolls with the text content. So not only can it be done, I've done it. Right there, at that link I posted in the OP. And it works in all major browsers, including Safari on Mac.
    I was just wondering if there was a BETTER way to do it. But if people are going to start telling me it simply can't be done, when the proof that it can is staring them in the face, then I guess I'll just count myself lucky that I achieved what I've achieved and stick with what I've got.

  • 4 Simple Flash Questions that Are Stumping Me!

    What is the Frame Rate for Web Animations
    Q1. I am making an animation which will be played on the web. What is the default frame rate (fps) of Flash CS5? And what is the frame rate of for web?
    Q2. My animation needs to be 30 seconds long. So at 15 fps that would mean I need to use 600 frames in Flash?
    How Do I Mask everything so all I see is the Content on the Stage?
    I have a wide image that extends past my movies stage size so when I preview my movie the image is visible. How do I mask out anything that extends past my movies window size? I believe I can create a layer named "mask" and place it above all other layers, but I forget how to make the mask. Any help is appreciated.
    How to Fade a Graphic
    I have a graphic element (some type) and I want it to fade from 0% to 100%. In older versions of Flash I could just select the symbol and then set it's alpha value to 0%, move a few keyframes and then set the alpha to 100%. Voila! but now it doesn't seem to work that way. How can I do this in CS5?

    Ned, it says 24 fps which means there is 24 frames per second so each 24 frames is 1 second.
    Date: Fri, 4 Nov 2011 05:35:16 -0600
    From: [email protected]
    To: [email protected]
    Subject: 4 Simple Flash Questions that Are Stumping Me!
        Re: 4 Simple Flash Questions that Are Stumping Me!
        created by Ned Murphy in Flash Pro - General - View the full discussion
    1 You can create your character as a movieclip and copy/paste that movieclip from one file to another. 2. One way to create a movieclip is to copy all the frame of the animation's timeline (select them all, right click the selection, choose Copy Frames), then create a new movieclip symbol (Insert -> New Symbol...etc) right click on its only keyframe and chhose Paste Frames.  THat will put all the layers and frames you copied into the movieclip The only way to come close to being certain about the timing of you animation is to use code to keep track of the time, something like getTimer()..  The frame rate that a file plays at is not a reliable means of dictating the time it takes due to a variety of factors which include the amount of content you are trying to process and performance limits of the user's machine.
         Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/4007420#4007420
         To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/4007420#4007420. In the Actions box on the right, click the Stop Email Notifications link.
         Start a new discussion in Flash Pro - General by email or at Adobe Forums
      For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

  • A few simple Logic questions...please help.

    I have a few probably simple Logic questions, that are nonetheless frustrating me, wondering if someone could help me out.
    1. I run Logic 8, all of the sounds that came with logic seem to work except organ sounds. I can't trigger any organ sounds (MIDI) on Logic, they won't play. I have a Yamaha Motif as my midi controller.
    Any idea why?
    2. I've starting running into a situation where I will record a MIDI track, the notes are recorded but they won't playback. The only track effected is the one that was just recorded. All other midi tracks playback.
    I have to cut the track, usually go out of Logic and back in, re record for it to playback properly. Any idea why this may be happening?
    3. How important is it to update to Logic 9. Are there any disadvantages down the road if I don't upgrade. If I purchase the $200 upgrade, do I get a package of discs and material, or it just a web download.
    Any help is appreciated!
    Colin

    seeren wrote:
    Data Stream Studio wrote:
    3) You get a full set of disks and manuals.
    They're including manuals now?
    I think his referring to the booklets ...on how to install etc
    It would be great to see printed manuals though ...I love books especially Logic/Audio related !!
    A

  • AwesomeWM: Some layout questions

    Hey guys,
    I've been customizing Awesome and really loving it so far! But I'm a little confused about how some tiled layouts are handled.
    Basically, I modified the original table of layouts to just include
    awful.layout.suit.floating,
    awful.layout.suit.tile,
    awful.layout.suit.max
    but soon found that in the "tile" layout, the section of screen with the master window never accommodates more than one window. Then, I found that "awful.layout.suit.fair" is almost PERFECT, except:
    Resizing doesn't work - neither using Mod4+{h,l} nor using Mod4+Mouse3
    There doesn't appear to be an "awful.layout.suit.fair.left" or "awful.layout.suit.fair.right", despite the fact that the layout is asymmetrical
    Hopefully that makes sense. Basically, what I really want is a mirror-image "awful.layout.suit.fair.left" which also allows dynamic resizing, using either mouse or keyboard.
    Therefore my question is: Does this already exist? If not, can I create a new awful layout pretty easily? Is there documentation besides luadoc that I should check out?
    Thanks so much!
    P.S. I actually found one post that suggests that in the 'fair' layout, the sizes are fixed -- why would this be, and how would I have found this out? The documentation doesn't describe the layouts at all.

    Hey guys,
    I've been customizing Awesome and really loving it so far! But I'm a little confused about how some tiled layouts are handled.
    Basically, I modified the original table of layouts to just include
    awful.layout.suit.floating,
    awful.layout.suit.tile,
    awful.layout.suit.max
    but soon found that in the "tile" layout, the section of screen with the master window never accommodates more than one window. Then, I found that "awful.layout.suit.fair" is almost PERFECT, except:
    Resizing doesn't work - neither using Mod4+{h,l} nor using Mod4+Mouse3
    There doesn't appear to be an "awful.layout.suit.fair.left" or "awful.layout.suit.fair.right", despite the fact that the layout is asymmetrical
    Hopefully that makes sense. Basically, what I really want is a mirror-image "awful.layout.suit.fair.left" which also allows dynamic resizing, using either mouse or keyboard.
    Therefore my question is: Does this already exist? If not, can I create a new awful layout pretty easily? Is there documentation besides luadoc that I should check out?
    Thanks so much!
    P.S. I actually found one post that suggests that in the 'fair' layout, the sizes are fixed -- why would this be, and how would I have found this out? The documentation doesn't describe the layouts at all.

  • Simple Quick Question

    wrong section, post was moved.
    Message was edited by:
    Rob17

    you titled "simple quick question"...
    .. complicated to answer..
    a) the TermsOfUse of the iTS don't allow any processing of purchased files, these are "copy protected"..
    b) iM has a voice-over function..
    c) iM is a video-edit app.. easy to use... just learn to handle it...
    d) iM allows to "extract" audio (=muting the original audio, adding your own..)
    e) to learn iM, spend some time here: http://www.apple.com/ilife/tutorials/imovie/index.html
    f) use pencil and paper first! WRITE and scribble, what shall happen when in your movie/parody... make a script, draw a storyboard .. THEN launch iM.. in other words: think first, then edit.. iM is just a tool, it does not "create"... Picasso needed a papertowel and half a stencil to create art....
    g) to get comfortable with iM, start with your own, small, short (3min!) project... import some stills, edit them, add a funny voice-over, add sounds, add music... good? make a bigger one...
    h) .. in our Lecture II, we teach you how to import shows from TV, youtube, wherever..
    standard disclaimer:
    be nice to ©opyrights ...

  • On Ibooks Author, my programmed image for the Chapter page no longer shows up on new pages, just appears as a question mark inside a box, How do I fix this?

    On Ibooks Author, my programmed image for the Chapter page no longer shows up on new pages, just appears as a question mark inside a box, How do I fix this? Please help, its the same when I try and copy and paste the same image within Ibooks author.

    https://discussions.apple.com/message/24420017#24420017
    You may have  moved or removed content on your page or  its possible you  used the"Adjust Image" and over sharpeed one or more images.
    I assume  you mean it does not show up of new Chapter pages... have you checked the  template?
    Where you see the  ?    you  need to either reduce teh  box outline size - or drop anther  copy of the original image onto  it, it may  fill the  ? box or sit on top.... delete the ? box.
    If its Chapter page only related, its  better doing this in the template.
    Is you image .jpg or .png?

  • My ipod touch is being read as just a simple camera and will not let me access it, how does one go about fixing this problem

    My ipod touch is being read as just a simple camera and will not let me access it, how does one go about fixing this problem? My screen has recently cracked and i need to retrieve my music from it but cant do so when my computer is reading it as a camera and only showing me its pictures.

    Here:
    iOS: Device not recognized in iTunes for Windows
    or
    iOS: Device not recognized in iTunes for Mac OS X
    Also try another computer.

  • Hello every body .. my ipad blocked with icloud and i dont remember the email or even birthday i've wrote I just remember the security question ... what can i do in this case to restor my email working ?? thx

    hello every body .. my ipad blocked with icloud and i dont remember the email or even birthday i've wrote I just remember the security questions ... what can i do in this case to restor my email back ?? thx

    Do you mean that the iPad is on the activation screen ? If it is then does it not show the first letter of your email address and the provider e.g. similar to :
    If that is what you are seeing then you don't remember any email account that you had starting with that letter with that provider ? If not then do you know if you have any of the account's downloads in your computer's iTunes library : Recovering a forgotten iTunes Store account name ?
    Or see if you can find it via http://appleid.apple.com : Apple ID: How to find your Apple ID
    If you cant remember or find your id then you won't be able to use your iPad

  • Simple performance question

    Simple performance question. the simplest way possible, assume
    I have a int[][][][][] matrix, and a boolean add. The array is several dimensions long.
    When add is true, I must add a constant value to each element in the array.
    When add is false, I must subtract a constant value to each element in the array.
    Assume this is very hot code, i.e. it is called very often. How expensive is the condition checking? I present the two scenarios.
    private void process(){
    for (int i=0;i<dimension1;i++)
    for (int ii=0;ii<dimension1;ii++)
      for (int iii=0;iii<dimension1;iii++)
        for (int iiii=0;iiii<dimension1;iiii++)
             if (add)
             matrix[i][ii][iii][...]  += constant;
             else
             matrix[i][ii][iii][...]  -= constant;
    private void process(){
      if (add)
    for (int i=0;i<dimension1;i++)
    for (int ii=0;ii<dimension1;ii++)
      for (int iii=0;iii<dimension1;iii++)
        for (int iiii=0;iiii<dimension1;iiii++)
             matrix[i][ii][iii][...]  += constant;
    else
    for (int i=0;i<dimension1;i++)
    for (int ii=0;ii<dimension1;ii++)
      for (int iii=0;iii<dimension1;iii++)
        for (int iiii=0;iiii<dimension1;iiii++)
           matrix[i][ii][iii][...]  -= constant;
    }Is the second scenario worth a significant performance boost? Without understanding how the compilers generates executable code, it seems that in the first case, n^d conditions are checked, whereas in the second, only 1. It is however, less elegant, but I am willing to do it for a significant improvement.

    erjoalgo wrote:
    I guess my real question is, will the compiler optimize the condition check out when it realizes the boolean value will not change through these iterations, and if it does not, is it worth doing that micro optimization?Almost certainly not; the main reason being that
    matrix[i][ii][iii][...]  +/-= constantis liable to take many times longer than the condition check, and you can't avoid it. That said, Mel's suggestion is probably the best.
    but I will follow amickr advice and not worry about it.Good idea. Saves you getting flamed with all the quotes about premature optimization.
    Winston

Maybe you are looking for

  • How to access a javascript variable from Java?

    Here is my code: function validateLoginForm() {     var username = document.getElementById('un');     setCookie('un', username, 3650);     //etc. <%        HttpSession httpSession = request.getSession();     httpSession.setMaxInactiveInterval(30 * 60

  • 2011 MBP having limited screen resolution in Bootcamp

    Hi All, Running Bootcamp 4.0 with Win7. Bootcamp software is installed, drivers seem to be in place. The screen has a limited resolution though, not the full 1440 x900 that it should have. Clicking on screen resolution only shows the one option for r

  • Insert a text module in my custom ISR form

    Dear All, I am facing an issue when trying to insert a text module in my custom ISR form . I have created a custom text module, and inserted the same in the context of my form. This form is linked to my ISR scenario. On running this scenario via port

  • I have deleted users but the free space is not available what did I do wrong

    Not sure what has happened.  I deleted a user and it should have freed up about 150gb of hard drive space.  It hasn't, when I go to about this make and click on storage it is still showing 100gb of space for movies, and 40gb for other, and 10gb for m

  • Adding/merging non intersectng elements.

    I've got a question that I have for a few months. I know this was possible in CS3 but since CS4 I think it has been deleted. I'm Struggling with the follwing: - Let's say I have 5 elements that are NOT overlapping. I know that it was in possible in C