Swing Layout for different screen resolution

Hi All,
I am developing an application which will always run in a FULL SCREEN mode.
I intend to make it working on all screen sizes (resoultions) and on different OS and devices.
Since I am new to Swing, could anyone of you suggest a good layout manager to manage the components?
I am using NetBeans 6.8 (which uses a GroupLayout) for designing the GUI but when I change the screen resolution, the arrangement is all messed up.
Also, I am not able to design my application's GUI using NetBeans GUI builder as there is noway I can get an idea of how things will look like in the EXTENDED_BOTH state.
It will be very helpful if anyone could suggest..
Thanks!

The entire point of Swing LayoutManagers is to get a (reasonably) consistent layout across different resolutions, window sizes, platforms, etc. Of course, different window sizes and aspect ratios will affect things slightly, but any LayoutManager properly used will do the job you're describing.
As for which LayoutManager to use, I think that's a misleading question because it's not uncommon to use multiple LayoutManagers for a single screen. But in my experience it's possible to do 95% of what you want using GridBagLayout and a properly nested hierarchy of JPanels. GridBagLayout is a pain to get used to (caution against re-using GridBagConstraints), but once you do it's amazing what you can get out of it.

Similar Messages

  • How to programmatically resize vi for different screen resolutions ?

    Hi,
         I have been struggling with this,How can i built a vi that should run for different screen resolutions (on different pc's).
    There are several threads on forum , But i dont find the exact solution for it.
    I have already tried with VI properties in the VI but i dont think its working.
    Can someone please help me ?
    Thanks and regards,
    Shivkant Paswan

    Yup it is a pain to use panes, but that is the easiest method I've found which meets my requirements.  Learn to use panes and splitters effectively, and then learn their limitations and workaround when you find those limitations.  In general LabVIEW should handle multi-resolutions, and resizing better but these are the tools we have today.
    Unofficial Forum Rules and Guidelines - Hooovahh - LabVIEW Overlord
    If 10 out of 10 experts in any field say something is bad, you should probably take their opinion seriously.

  • Design and Testing Suggestions for Different Screen Resolutions

    Intermediate Dreamweaver CS3 user, in need of "Design and Testing Suggestions for Different Screen Resolutions".
    Thank you, J. Chavez

    Adobe Browser Labb and BrowserShots.org

  • Optimizing captivate file for different screen resolution

    Hi,
    I've a problem in optmizing the captivate file for different screens like laptop,netbook and pc. In PC's and laptops, this is not a major issue as the size of the screen is large. But when we play the captivate generated swf file in a netbook, the whole website gets resized to fit in to the resolution of the screen except the captivate file.Captivate file gets truncated in such a way that, the user can read only half of the slide.
    Thanks in advance
    Parvathy

    One thing you can try is adjusting the swf dimensions manually.  I haven't found a way to do it in Cp.  We had a similar problem with some eLearning we built that all our testers used just fine.  But once someone undocked their laptop and was off their desktop monitor, had the same problem you describe, where the bottom of the movie was cut off.
    Once you publish the files, open the .htm file with notepad or your text/html editor of choice.
    Look for a line that looks something like this:
    var so = new SWFObject(strURLFile + strURLParams, "Captivate", "1100", "798", "10", "#CCCCCC");
    or
    var so = new SWFObject("filename.swf", "Captivate", "1600", "1200", "10", "#CCCCCC");
    Change those numbers in quotes to 100%, like this:
    var so = new SWFObject("filename.swf", "Captivate", "100%", "100%", "10", "#CCCCCC");
    save the .htm
    My experience has been it will adjust the swf so it fits either the height or width of the display, whichever is shorter.  That is, it will either fill the top to bottom OR side to side, but keep the swf in proportion.
    hope that helps.

  • Creating an app for different screen resolutions/sizes

    Hi
    I'm currently in the process of learning application development for the iPhone and could do with some help on how to cater for retina and non-retina screens. I want to create image assets for each screen type.
    What the best way to go about detecting if the user has an iPhone 4 for example and selecting the appropriate images for that resolution? I understand that you attach '2x' to file names when coding natively but for a pure Actionscript project where the assets might be contained in a swc file what would be best to do?
    Thanks

    Hi Vic,
    The biggest advantage of building apps in Flash CS5.5 or Flex is the ability to target multiple devices and the 2 major platforms, iOS and Android oh and also Blackberry (anyone?).
    Best way to approach a build is to assume you do not know the screen size your app will be used on, since Android is so all over the place.
    I have been using stage.stageHeight and stage.stageWidth religiously for all my scaling although I have heard that method has its problems, it has worked well for me, I have put out 2 apps personally and 3-4 for work using this method both in Landscape and Portrait orientations and this method has worked well.
    The easiest way to build a multi screen app is to design it for an average ratio, 3:4 being the lowest = iPad so lets say you pick some decent size that wont be too big for smaller screens like the iPhone 3gs 480x320 and wont be too low for high res screens like the new Google Nexus or the Motorola Xoom 1280x800. I usually target the iPhone 4 screen 960x640 right now it seems to fall in the middle between older phones and tablets.
    The real quick and dirty way of doing it is to build all your assets inside a movie clip and then scale that movie clip proportionally to the stage, first checking to make sure none of it would be cut off due to different screen ratios, this is not the best way of doing it but it works well and its the easiest method.
    A better way is to scale and place your content in relation to the stage, again the stage.stageWidth and Height properties are your friends so if you have an element that always goes in the middle you would place it my_mc.x = stage.stageHeight / 2 and same with the y, you can also scale it to the stage my_mc.width = stage.stageWidth/4 this way the movie clip is always 1/4th of the stage width regardless of the screen, its a lot planning up front but this method allows you to cover the entire screen instead of just cramming your movie clip in there however it fits.
    Let me know if any of that helped I can go into further detail but I feel like I am rambling on.

  • Panel collection with auto height for different screen resolution

    Hi.
    I created a page using panel collection by default height for 1024 * 768 screen resolution and works fine. When I change the screen resolution to 1152 * 864 then my page layout changes as I can see lot more space at bottom due to fixed height define for panel collection.
    Here my question is how to make height as dynamic for panel collection which can changed based on screen resolution. Usually percentage for height attribute resolve the issue but JDev 11.1.1.4.0 doesn't support percentage its allows only pixel or em.
    Please let me know to resolve this issue.
    Thanks

    If you want a table to occupy 80% of the height of the screen you should be able to do this with assigining % to the various panelStretch facets - like this:
        <af:form id="f1">
          <af:panelStretchLayout id="psl1" topHeight="10%" bottomHeight="10%">
            <f:facet name="bottom">
              <af:spacer width="10" height="1" id="s2"/>
            </f:facet>
            <f:facet name="center">
              <af:panelCollection id="pc1">
                <f:facet name="menus"/>
                <f:facet name="toolbar"/>
                <f:facet name="statusbar"/>
                <af:table var="row" rowBandingInterval="0" id="t1">
                  <af:column sortable="false" headerText="col4" id="c1">
                    <af:outputText value="#{row.col4}" id="ot1"/>
                  </af:column>
                  <af:column sortable="false" headerText="col5" id="c2">
                    <af:outputText value="#{row.col5}" id="ot2"/>
                  </af:column>
                </af:table>
              </af:panelCollection>
            </f:facet>
            <f:facet name="start"/>
            <f:facet name="end"/>
            <f:facet name="top">
              <af:spacer width="10" height="1" id="s1"/>
            </f:facet>
          </af:panelStretchLayout>
        </af:form>

  • 11gr1 - Handling different screen resolutions for an enterprise app.

    Hi,
    We are developing an enterprise application that will be deployed at different clients with different hardware.
    We are confused about how to handle different screen resolutions and wonder how others are handling this.
    We have some fixed size areas in our screens and liquid areas for content that may expand. The problem is say that you have a table with 6 columns. This table will be rendered nicely at 1280X800 but not at 1650X1050 or 800X600.
    At higher resolutions we will either end up having some blank space or expand one of the columns of the table , but can't expand every column proportionally and this will look ugly.
    For lower resolutions same problem in a different way will come into picture, we will not able to resize the columns and end up with scroll bars etc ...
    What is the best practice with handling different screen resolutions for components like table,panel splitter etc ?
    Thanks

    Hi Muhammed,
    I don't think that any better solution exists, you already use liquid layouts and define widths & heights with percentages etc. In my opinion using blank column at the end of table columns makes table's looking better. Additionally creating custom skin for table and defining column heights & widths with % or em may help you to stretch columns?

  • Images: Different screen resolutions, howto ...?

    As you might know, there are several screen resolutions, used by different devices (iPhone 3G/3GS/4, iPad).  You might take a look at: http://stackoverflow.com/questions/2993006/designing-for-varying-mobile-device-resolutions -i-e-iphone-4-iphone-3g  An example: If i would like to build a generic app, with optimized images for the iPhone 3G/3GS, 4 and iPad, how can i implement the images within my application with the use of different screen resolutions (dpi). 3G: image_low_res.jpg, 4: image_high_res.jpg etc.  Is there a better overview for iOS devices showing the exact resolution (dpi)?

    In objectiveC/XCode, you would have two images - one at standard size, and one at double resolution for the retina display. The double-resultion image has a '@2x' suffix just before extension. The OS automaticallt uses the correct image depending on the type of phone (i.e. it uses the @2x image on the iPhone4, and the original image everywhere else).
    Of course this doesn't help us in Flash.  I don't think Adobe have built this feature in to the packager?
    Perhaps a good way to achieve the same results is to have the application detect the phone type on startup/constructor by checking the screen size (Capabilities.screenResolutionX/Y).  Then, whenever you need a screen coordinate, distance or an image, you have a custom class (probably static methods) that you ask for this information.
    It seems like a lot of work, but if you are really keen on supporting the retina display, this is probably your best bet!
    Psuedo code:
    // Two images in the library
    // spriteA.png
    // [email protected]
    // All my coordinates are measured in original iPhone coords (320x480)
    // I am now asking for a point in the middle of the screen
    // If I am on iPhone4, the resulting point will be (320,480)
    // If I am on iPhone, the resulting point will be (160,240)
    var p : Point = ResHandler.createPoint( 160, 240 );
    // Now I grab my bitmap
    // If I am on iPhone, the resulting bitmap will be spriteA.png
    // If I am on iPhone4, the resulting bitmap will be [email protected]
    var b : Bitmap = ResHandler.createBitmap( 'spriteA' );
    // Now place the bitmap
    b.x = p.x;
    b.y = p.y;
    addChild( b );
    // Now move the bitmap by 100 pixels.
    // If I am on iPhone the resulting distance will be 100 pixels
    // If I am on iPhone4, the resulting distance will be 200 pixels
    var d : Number = ResHandler.getDistance( 100 );
    b.x += d;
    Hope it helps

  • Scaling front panel objects for different screen sizes

    Hi,
    Can anybody help me of designing Vi for different screen sizes. I have designed a VI for a monitor of small size and lower resolution but when I open the same Vi on a different monitor,objects are not aligned properly. The properties which I have changed are
    Window appearence->Default
    Window Size -> Panel size 0,0   & Tick marked options of Maintain propotions for different monitors and scale all objects 
    Window Run Time position-> Maximum
    Regards
    Imran
    Solved!
    Go to Solution.

    Imran,
    I can't solve your problem entirely.  However when I have to write a program that will be deployed on a variety of monitor sizes, I tend to set the size of the Front Panel to suit the smallest monitor, and then remove the ability of the user to resize it.
    Also, set it to run in the centred position.
    See attachments.
    Many Thanks,
    Dan
    Dan
    CLD
    Attachments:
    Customize Window Appearance.JPG ‏44 KB
    VI Properties.JPG ‏29 KB

  • Photoshop RAW processing with different screen resolutions

    Hi, I know this might not be fully a photoshop question, but I have done so many searches online & am unable to find anything.
    I usually do RAW photo editing on photoshop on my old Fujitsu laptop & have recently I have upgraded to a MacBook Pro. I have noticed that when I do the same kind of processing on my Macbook, the photos tend to not be as dark & have contrast as I would normally like it to be.
    Meaning to say, photos that look really dark in on my Macbook look rather greyed & washed out on my Fujitsu, however the photos I have processed on my Fujitsu all look nicely exposed on my Macbook.
    So is this due to different screen resolutions? Because the photos I have edited on my mac look really different when compared to on my fujitsu, like the colours etc. Please do advise me on what exactly is the problem & what I can do to solve it. Thanks!

    It all depends on the colour range, brightness, and contrast of the screen, and the screen technology. The only way to make somewhat sure that the colours are "correct" and consistent is to purchase a hardware screen calibration device, like a spyder. But even then the laptop screens tend to be quite bad for this type of work.
    Read up on this topic here:
    http://www.pcworld.com/article/241957/how_to_calibrate_your_monitor.html

  • How can i set a layout for MIGO screen

    Hello all,
    How can i set a layout for MIGO screen. & make that layout default. Like i want to drag Requistioner column next to quantity in MIgo screen. temporarily I can drag but is there a way to save as layout & save it.

    Hi
    First you arrange however you want and then go to table settings which is there in the right corner of the item details and create a variant and save.
    Find a button with blue yellow and white at the top end above the vertical drag bar when put the cursor it will show you as Configuration.
    After creating the variant tick the check box use as standard setting below the variant
    Hope it helps
    Edited by: Girish  Adaviswamy on Mar 3, 2010 1:27 PM

  • Different layouts for different pages

    hi all,
    i have created a form in which there are 5 output pages but the print preview shows only the first page out of 5.i want to go to the next page.plz help how would i do that.and  i want different layouts for different pages.
    thnks n regards,
    mukesh.

    Hi Mukesh,
    Read these lines which has been given in help.sap.com and also go through the link given below.
    Main Window on Several Draft Pages :
    if you want the pages on which a table with items is printed to have different layouts. Height and position of the main window may differ on the different pages, but the width must remain the same throughout.
    [Main Window|http://help.sap.com/saphelp_nw70/helpdata/en/b1/243fdabeee11d4b633006094192fe3/content.htm]
    Regards,
    Sravanthi

  • Displaying remote panel on different screens with different screen resolution

    Hi
    I am running a vi on the PXI . But when i try to open the remote panel it gets shifted on different screens
    with different screen resolution. I have tried to set the windows run time position using the vi properies
    but to no avail. Can anyone help me on this issue??????
    Regards
    Amit Ahuja

    What is your lv version?

  • I have problems with office for mac  screen resolution, specially with excel

    I have problems with office for mac  screen resolution, specially with excel ?

    For starters, make sure to Check for Updates on any of the Help menus, and make sure the product has all the latest patches. MS did come out with a patch addressing the display issues on Retina Macs. Latest patchlevel is 14.3.2.
    We are talking about Office:Mac 2011, right?

  • Why SAP Standard Program Can full screen in different  screen resolution ,but my own program can't?

          How to make my program can display full screen in the different screen resolution ? can you tell me ,
          Thanks  everyone!  eg. T-code: SOST

    It appears that the full-screen display will only work on the display that has the menu bar.
    You can switch the menu bar to your external display by going to Solid Apple -> System Preferences -> Displays, then Arrangement.
    Grab the menu bar and drop it on the icon representing your external display.
    When you full screen an app it should then full screen on the Cinema display.
    I wish it would just full screen on the display the window is on, but that is evidently not the way it was designed to work.

Maybe you are looking for

  • Why do I get a locked disk or no permissions error in Windows 8?

    This is the error that I am receiving. It happens on only one of my computers, all running Windows 8. It does it in version 10 and 11. The library is on a network server. I am abel to access and play the music in Windows Media Player and the Windows

  • Passing XML into JSP Variable

    I want to do the following <% response.setContentType("text.xsl"); String something = ""+<xsl:value-of select='@id' />+""; %> But seems like the xsl doesn't render Can someone point me in he right directions

  • Disable quicktime plug-in opening TIF files in browsers?

    Whenever I click on a TIF file in a browser (Chrome or Safari), Quicktime plug-in tries to open the file. I'd rather have the file opened by an application that actually works (quicktime fails to load or displays garbage in most cases, but I do not c

  • Autonomous 1231/1242 Radius Config Help. What is this not working?

    Hey Guys, I can't seem to get the SSID RadiusTest to work properly. Windows PC's show "Windows was unable to find a certificate to log you into the network". Macs don't authenticate either. Radius server isn't seeing any requests at all. Radius serve

  • How to Sync my IE 11 favourites with my Windows 8.1 Phone?

    Hi All, I have the developers version of Windows Phone 8.1 on my HTC mobile. I am trying to sync my IE favourites between my Windows 8.1 laptop and my Windows Phone 8.1 mobile phone. This is meant to be a new feature in Windows Phone 8.1 but I cannot