How do I create this kind of layout with JPanels?

Hi! I am wondering how I would go about creating the following layout. Which layout manager should I use?
I have two JPanels in a JFrame. Jpanel1 should expand in size (width and height) and fill "the rest" of the JFrame when I resize the JFrame. Jpanel2 should always have the same ratio between the width and height no matter how I resize the JFrame. JPanel2 shouldn't be a fixed size though! See below sketch.
|                                                    |                                      |
|                                                    |                                      |
|                       Jpanel1                      |               Jpanel2                |
|                                                    |                                      |
|                                                    |                                      |
--------------------------------------------------------------------------------------------

You can use a BorderLayout.
Place panel1 in the center of the border layout, and panel2 in the east.
You should also override getPrefferedSize method of panel2 to return the preferred size based on the calculation of the ratio between the width and height.

Similar Messages

  • How do i create this kind of effect

    Hi i was just wondering if anyone knows of any tutorials or anything on creating this kind of effect. Do you think it was done in after effects?
    Its the 3d camera pan at around the 2:40 mark of the video.
    http://www.coreonlinemagazine.com/index.php/aaron-hadlows-new-movie-calibrate/336
    Thanks

    One more thing, guys. I looked through most of the effects he used and I can explain how did it, except how on earth did he pull this off?
    Take a look, I isolated them (hope these links work):
    http://www.mediafire.com/?2mgyymnbb2m
    http://www.mediafire.com/?z1mnyanwgmn

  • How do i create this kind of click box?? HELP

    Hi There,
    How do i create a click box that when you double click it a
    black dot is displayed. Im sorry if im not being clear. I mean a
    dot in the middle of a circular click box. When you click multiple
    choice, sort of.
    Any help would be appreciated! Thanks
    Simona

    Hi Simona
    If I'm understanding you correctly, you are referring to what
    used to be known as a "Radio Button" and is now preferred by
    Microsoft to be called an "Option Button". Captivate doesn't allow
    these to be created. One possibility is to use two images to
    achieve the effect. The "Unfilled" or "Un-Selected" image on one
    slide and when clicked it would display the 'Filled" or "Selected"
    image on the next slide.
    Cheers... Rick

  • How do I create a crystal report layout with a table and borders

    My crystal report is a signin sheet. The sign in sheet has an ID column, Name column, Institution column, Place to signin column, and Weekday columns with checkboxes in each column for the visitor to checkoff.
    How do I display the data that is being used int he crystal report in a table layout with borders around each cell? And is it possible to center vertical alignment of the data within eacvh cell like Excel?

    Blahahaha! Great answer Deb!
    Seriously though... There is no vertical alignment in CR. There have been several past threads related to this issue and all of them have various workarounds. None of them are very elegant.
    The best workaround I've found (especially if you are grid or borders) is to turn off the boarders for the field itself and drawl a rectangle around the field(s). Now you can place the field in the lower portion of the rectangle and adjust the rectangles height to place the field text in the center of the rectangle.
    This will give you more control over the height of your elements than using a carriage return before the text.
    Jason

  • How do I create this kind of synth track?

    I'm trying to recreate the synth instrument used in this song in Garageband... from 0:05-0:13
    http://www.youtube.com/watch?v=vW1hv37imjw
    I'm not sure how I should go about doing so...I don't want to be playing individual keys for each chord pressed. I would like to do what the band does in the video, where they hold a chord down only.
    I'm not sure if I'm being understandable, but any help is greatly appreciated!

    What you are looking for is an arpeggiator.
    Not sure if you have a hardware or software synth already...if you do, look for an arpeggiator function.
    If not...
    There are many hardware and software synths and even DAW's with arpeggiators.
    Here's an example of Logic's....
    http://www.youtube.com/watch?v=JFyJs6VqOIg

  • How would I create this kind of smart playlist?

    top 100 most played songs exclude films, tv programmes and podcasts.

    Match rule:
    Playlist is Music
    Limit to 100 items by most often played.

  • How can i design this kind of chart ?

    How can I create this kind of pie chart.

    After you enable dashed line, go the right and make sure the second icon is down. Enable the second icon for cap. Enter the 3 values I have shown, and then adjust to your liking

  • How do I create this special lens flare effect?

    Hey all!
    So I was wondering how to create a lens flare-like effect. I should mention that I already know how to make the circle lens flare effect in after effects but I'm looking for more of a colored "wash" lens flare effect.
    The effect is in this video starting at 00:16 seconds, with the lady in the car and the pink/yellow hues bouncing around.
    http://vimeo.com/60631128
    Any help would be greatly appreciated. Or at least pointing me towards a tutorial or just the name of the effect so i can find a tut.
    Thanks all!

    First created shape layer that is Close to the base color you want for your flair. Second add fast blur or Gaussian blur of a value that is about half the size of your shape layer. Change the blend mode to add, duplicate, increase the blurb about 50%, duplicate repeat until you get what you want. Many times when creating this kind of an artificial lens flare effect I would use many different colors in the same flare. Sometimes I will make the layers 3-D and move them around in 3-D space.
    The only other really good option is to buy some stock footage of real lens flares and colorize them using color grading effects.
    by the way, one color grading and creating "light" affects you should always work with 32-bit projects.

  • How Can i create this  especific xml using structNew()?

    Hi everyone!
    I'm starting my first steps using coldfusion technology and i have been facing some problems when i try to create a client that consumes my webservices.
    What i trying to do is:
    to create this kind of xml structure:
    <elem att1="1" att2="2"/>
    i use this coldfusion code:
    elem= structNew();
    elem.att1= "1";
    elem.att2= "2";
    But, what if i want to create this kind of structure
    <elem att1="1" att2="2">ELEMENT VALUE</elem>
    what can i do to insert the element value "ELEMENT VALUE"
    I tried structInsert, but i don't think it'll help me.
    Thank in advance,
    Felipe

    Thanks again for your help and patience, Ian.
    I wrote two client webservices using coldfusion structNew() and worked perfectly because they didn't use element values, just attribute values
    In my client webservices i use this to consume the webservices:
    message= structNew();
    message.date = "2009-11-16";
    message.num = "010203";
    user= structNew();
    user.account= "902301003456175";
    user.pwd= "123456";
    objetcWS = structNew();
    objetcWS.message = message;
    objectWS.user = user;
    ws = createObject("webservice", "http://www.somedomain.com/soap/wsfile.wsdl");
    return =  ws.getSomeData(objectWS);
    Those codes above creates the xml request structure that communicates  with  the servef through SOAP protocol:
    <message date="2009-11-16" num="010203"/>
    <user account= "902301003456175" pwd= "123456"/>
    As i said, that works fine, but the problem is when i have to send to my webservices server something with the xml structure like this
    <user account= "902301003456175" pwd= "123456">USERNAME</user>
    i have no idea how to set the value (Text) of the element user.
    That my main question (for now hahahaha).
    sorry for any confusing concepts i wrote.
    Thanks again

  • HT4191 iPhone Local Storage "My iPhone" - How do you create this folder for use by the Notes app on a iPhone or iPad?  If I want to keep some notes only on my device and not in a cloud environment associated with an e-mail account.

    iPhone Local Storage "My iPhone" - How do you create this folder for use by the Notes app on a iPhone or iPad?  If I want to keep some notes only on my device and not in a cloud environment associated with an e-mail account.  I've seen reference to the  "My iPhone" local storage put no mention on how you create this folder or access this folder within the Notes app.  I realize storing information in a local storage like this provides no syncing between other iDevices but that is exactly what I'm looking for.  I'm running iOS7.0.4 on a iPhone 5S, and a iPad Air.  Any help would be greatly appreciated.

    If you go to Settings > Notes > Default Account you will see "On My iPhone" as the default account and the only choice if you have not enabled syncing Notes in Settings >iCloud or Settings > Mail, Contacts, Calendars. If you have enabled syncing you can still select "On My iPhone" as the default account. When you are in the Notes app you won't see any accounts listed if you have not enabled syncing because they are all in the On My iPhone account and that is the only place possible. It is not a folder that you create.

  • I want to create a HD disc with my Adobe Premier Elements but I am getting low resolution.  When I go to share the DVD to disc the form only offers 8pixels at the bottom.  How do I burn this DVD in HD with higher number of pixels?

    I want to create a HD disc with my Adobe Premier Elements but I am getting low resolution.  When I go to share the DVD to disc the form only offers 8pixels at the bottom.  How do I burn this DVD in HD with higher number of pixels?  I have read other forums on burning HD DVD's but I do not see the option to turn the 8 pi into 40 pi the one forum recommended.  I want my DVD to be HD so I may sell these videos online for my business.  I can't sell them the low quality they are burning now.  Hopefully you can help me.  Thanks.

    desalvom
    Thank you for your reply.
    You cannot burn your high resolution video that you can view on your computer to an AVCHD on DVD disc
    that will replay through a regular DVD player. But players are marketed under a variety of names with
    different support opportunities. One manufacturer may call its product MultiMedia Player, media player, Blu-ray player,
    etc.The bottom line is the specifications for each of the players that are candidates for the playback of
    the AVCHD format on DVD disc or the format of interest.
    If you upload your HD (1920 x 1080) video to YouTube, YouTube converts the video to flash format, but it goes up as the HD video.
    But, beware. Look at the YouTube viewing setting when your uploaded video is playing back. The YouTube default is not
    HD. It might be 360p, 480p. If you have a 1080p video, then before the YouTube playback, you should be looking
    at the video with the YouTube 1080p HD setting for best viewing. That is a YouTube matter.
    Best results depend on you
    a. setting up the Premiere Elements project preset to match the properties of the source media. That means, if
    you have 1080p source, you (manually) or the project (automatically) set the project preset at
    NTSC
    DSLR
    1080p
    DSLR [email protected]
    or the PAL counterpart, depending on your region need.
    b. if you upload your video to YouTube using the Premiere Elements feature, there is a HD preset, but you cannot
    customize it.....if you need customization, then you can export your Timeline to a file...in this example
    Publish+Share
    Computer
    AVCHD
    with Presets = MP4 H.264 1920 x 1080p30 or PAL counterpart
    and then customize the preset under the Advanced Button/Video Tab of that preset. In increase quality, you might look to increase
    the Bitrate under Advanced Button/Video Tab settings - without compromising the file size.
    Then you would upload that file to YouTube at the YouTube web site.
    All of the above are factors that need looking into in order to determine the why for what you wrote
    I have published a shortened advertisement video to YouTube- say 5 minutes-
    and it is low quality
    Often SD video upscaled to HD can present poorly. But, you are dealing with a HD workflow so that should not be introduced into the matter. The setup of the project and
    the properties of the source video are important, but let us start with the above and rule in or out those considerations first.
    Thank you. As always, any clarification needed, please do not hesitate to ask.
    ATR

  • How can I perform this kind of range join query using DPL?

    How can I perform this kind of range join query using DPL?
    SELECT * from t where 1<=t.a<=2 and 3<=t.b<=5
    In this pdf : http://www.oracle.com/technology/products/berkeley-db/pdf/performing%20queries%20in%20oracle%20berkeley%20db%20java%20edition.pdf,
    It shows how to perform "Two equality-conditions query on a single primary database" just like SELECT * FROM tab WHERE col1 = A AND col2 = B using entity join class, but it does not give a solution about the range join query.

    I'm sorry, I think I've misled you. I suggested that you perform two queries and then take the intersection of the results. You could do this, but the solution to your query is much simpler. I'll correct my previous message.
    Your query is very simple to implement. You should perform the first part of query to get a cursor on the index for 'a' for the "1<=t.a<=2" part. Then simply iterate over that cursor, and process the entities where the "3<=t.b<=5" expression is true. You don't need a second index (on 'b') or another cursor.
    This is called "filtering" because you're iterating through entities that you obtain from one index, and selecting some entities for processing and discarding others. The white paper you mentioned has an example of filtering in combination with the use of an index.
    An alternative is to reverse the procedure above: use the index for 'b' to get a cursor for the "3<=t.b<=5" part of the query, then iterate and filter the results based on the "1<=t.a<=2" expression.
    If you're concerned about efficiency, you can choose the index (i.e., choose which of these two alternatives to implement) based on which part of the query you believe will return the smallest number of results. The less entities read, the faster the query.
    Contrary to what I said earlier, taking the intersection of two queries that are ANDed doesn't make sense -- filtering is the better solution. However, taking the union of two queries does make sense, when the queries are ORed. Sorry for the confusion.
    --mark                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • How would I create a mobile blog layout, by combining Business Catalyst's Modules and Adobe Muse's mobile design function?

    The title says it all. I absolutely love Adobe Muse's ability to design mobile and tablet layouts and have grown very fond of the workflow between Business Catalyst and Adobe Muse. The only issue I have found is the ability to incorporate the blog module to a mobile design or tablet design. I understand that Business Catalyst has you insert a tag code to create a page template for the blog to sit in but is there any way to have a mobile and tablet layout for the same blog? I would love if visitors reading my blog from their phone, didn't have to switch from a phone layout to a desktop layout just to read the blog. Once they read/ switch the blog, they can no longer navigate back to the mobile website version because of the page template I have assigned to the blog. All in all, I just want the ability to have the blog fit all mobile, tablet, and desktop versions. Any ideas?

    Hey Brad,
    That answer really helped and I am making progress! Now for some reason when I pull up the blog on my mobile, it says 'Error: Some files are missing or can not be loaded. Please clear cache and reload the page.' Any ideas why this might be happening? I haven't used the {system_visitorDeviceClass} that you mentioned.
    Maybe the method I used to create mobile layouts was wrong but what I did was create mobile and tablet layouts with the {tag_pagecontent} on each. Once published, I copied the html code for the phone template (as it did not automatically recognize the mobile and tablet page template were part of the same desktop layout) and pasted it to my template I had already assigned as a default. I then did the same for my tablet layout. What am I missing here : /
    Thank you for all the help so far! I am making progress!

  • Cool effect..how can i create this effect on Motion 3?

    that's great.
    Someone please tell me how can i create this effect on motion 3?
    http://www.ayatoweb.com/aetips_e/ae17_mov05e.html
    thanks

    Use the bezier tool to create your shapes, give the shapes an Airbrush outline. Then apply a Write On behavior to each shape. Position the shapes in the timeline so they appear sequentially. To achieve the zooming out effect, you can either scale the whole group, or convert the group to 3D and use the camera to zoom out.

  • I have an old ipod 4G and im trying to create an apple id but got 1 problem... i live in canada so i chose the canada store but its telling me to submit a credit card so i tryied to find the none option! there no none option! how can i create this appleId

    i live in canada so i shose the canada store so now its asking me to add a credit card most people say to chose the none option but there no none option! how can i create this apple id without credit cards or without the none option!

    Either add or credit card or
    Create a NEW account/ID for her using these instructions. Make sure you follow the instructions. Many do not and if you do not you will not get the None option. You must use an email address that you have not used with Apple before. Make sure you specify a birthdate that results in being at least 13 years old
      Creating an iTunes Store, App Store, iBookstore, and Mac App Store account without a credit card
    More details of how:
    http://ipadhelp.com/ipad-help-tips-tricks/how-to-get-free-apps-from-the-app-stor e-without-a-credit-card/

Maybe you are looking for

  • Had the Z1 for a week, further questions (long post!)

    Hi again, So I've had the phone for about a week now and have been using it a lot, setting it up the way I want and learning my way around it (and around Android in general). I have a few more questions I hope someone will be able to answer for me. 1

  • Numéro de model

    Bonjour, Je voudrai connaître le numéro de model(version) du routeur wrt54g-ca. Le code bar du routeur en question que je voudrais acheter est le 745883555222 Autre question est qu'il fonctionne sous linux avec le DD-WRT Combien de ram et de mémoire

  • Local item 0010 L  cannot be deleted via ALE

    Hi, I am trying to delete an line item from Sales Order BOM through BOMORD01 Idoc. When I process an IDoc, I am getting a message "Local item 0010 L  cannot be deleted via ALE" in log (SLG1). Could you please tell me how to correct this error? Thanks

  • Safari and the BBC

    I'm using a macbook with 10.4.8 and realplayer through safari. Every 2or 3 mins I get a connection timed out message when listening to the BBC, any ideas?

  • HCM Forms and Process

    Hi all,    Is it even possible to change the Effective date of SAP_PA action? I have 4 backend service, SAP_PA Serv_1 Serv_2 SAP_PA I changed EFFECTIVE_DATE ( Field is available as input field in the form) in my Serv_1 also to ensure I changed it in