Resizing windows and components

Hi, i've been reading the swing tutorial on springLayout but i still haven't figured out how to do it.
Basically I want a jTable in a jScrollPane to resize itself whenever i resize the window. The window would also have other buttons, which positions I want to stay relatively constant to the borders (ex: always in the middle, or always to the left, etc. etc.), however i do not want to resize them. any ideas?
Thnx
Rickszyr

Don't use SpringLayout. Assuming what you stated is all you want in the window, my suggestion is to do the following:
1. The main window's content pane uses BorderLayout. Stick the JScrollPane containing the JTable in BorderLayout.CENTER.
2. Create a second JPanel that will contain your buttons. Add this JPanel to your content pane wherever you want (e.g. BorderLayout.RIGHT if you want it to the right of the JTable, BorderLayout.SOUTH if you want them below, etc.). The LayoutManager you use for this second JPanel depends on how you want the buttons arranged.
Basically, don't be afraid to nest JPanels with different LayoutManagers to achieve the layout you want. You'd be amazed with how much you can accomplish with BorderLayout and GridLayout, and sometimes a little bit of BoxLayout.

Similar Messages

  • Resizing an Applet window and components.

    How can I resize an applet window and not compromise the layout of components in the applet's panel? Can i get the components to resize as the applet's window resize?

    Try using GridBagLayout as your LayoutManager. Then use GridBagConstraints to specify the components behaviour on resizing.
    Hope that helps.

  • Resize windows and manage files in save/open dialogs?

    1. How to resize windows by dragging any border or corner?
    2. How to manage files via a Save/SaveAs or Open dialog (rename, delete, copy other files, etc...)?
    My search on these two things only comes up with comparisons and debates about Win vs Mac. Not relevant to the questions! I already run Win XP in Fusion when I have to for work. I don't want to run Windows; I just want to eliminate a couple Mac shortcomings since Apple hasn't. Yet. Maybe it has to do with patents...
    Anyway, does anybody know of a utility or other way to enable these functions in Mac OS 10? (I've tried Pathfinder; it doesn't quite do the trick.)

    I believe you will find a couple of third-party utilities that provide some enhancements for windows. As for file dialogs I can only recommend Default Folder X. You will find these at VersionTracker or MacUpdate.

  • Resizing Windows and Mac volumes

    Would anyone please be able to give me some direction as to how to downsize my windows volume in order to give me more space on the Mac volume? Thanks in advance...

    Do not even try to use Partition Magic. If you do an operation on your Windows disk using Partition Magic, Partition Expert or any other such program, you will not be able to boot your Windows!
    when bootcamp creates Windows partition, it sets this partition as active. thus, Windows sees this partition as C drive, and can boot without any problem. But, if you use such a program, It will corrupt the MBR, C: drive will disappear for windows, and it will not boot. This can even make bootcamp unable to run anymore!
    I tried to partition my windows partition like that for installing linux, and it screwed up! I could repartition and install windows+linux (triple boot). But this was really a pain! but right now I am unable to use BootCamp. i manually extract the drivers.
    And you talk about resizing OSX partition via Partition Magic. This can even damage hole system! I just tried to divide Windows partition in 2, and I lost Windows and BootCamp. if you try resizing OSX partition, you will lose everything as your MAC does not use old HD partitioning scheme like PCs do!
    I suggest you to not try that... It is easier to reinstall windows. So the best way is to use BootCamp for deleting Windows, and recreating Windows partition afterwards. Try getting the Image of your Windows partition before erasing it. Maybe after resizing, you can use your old Windows image, so you will not have to install Windows from scratch...
    MacBook Pro 2.16,ibook g4 1.33   Mac OS X (10.4.8)   wireless mighty mouse and 1/2 ipod nano black

  • Resizing windows and panels?

    This seems strange to me, but maybe I'm missing something.   I can't resize the panels horizontally if the "inspector/library/file browser" pane is shown.  At the same time, maximizing the window sends the bottom of the motion window behind the dock, and attempts to resize it just cause it to go away instead of resizing.  Is it necessary to hide the dock? or not be able to resize the window and adjust the layout?

    Do not even try to use Partition Magic. If you do an operation on your Windows disk using Partition Magic, Partition Expert or any other such program, you will not be able to boot your Windows!
    when bootcamp creates Windows partition, it sets this partition as active. thus, Windows sees this partition as C drive, and can boot without any problem. But, if you use such a program, It will corrupt the MBR, C: drive will disappear for windows, and it will not boot. This can even make bootcamp unable to run anymore!
    I tried to partition my windows partition like that for installing linux, and it screwed up! I could repartition and install windows+linux (triple boot). But this was really a pain! but right now I am unable to use BootCamp. i manually extract the drivers.
    And you talk about resizing OSX partition via Partition Magic. This can even damage hole system! I just tried to divide Windows partition in 2, and I lost Windows and BootCamp. if you try resizing OSX partition, you will lose everything as your MAC does not use old HD partitioning scheme like PCs do!
    I suggest you to not try that... It is easier to reinstall windows. So the best way is to use BootCamp for deleting Windows, and recreating Windows partition afterwards. Try getting the Image of your Windows partition before erasing it. Maybe after resizing, you can use your old Windows image, so you will not have to install Windows from scratch...
    MacBook Pro 2.16,ibook g4 1.33   Mac OS X (10.4.8)   wireless mighty mouse and 1/2 ipod nano black

  • Unexpected performance of Firefox in Windows 7, namely minimize/maximize/close buttons not working and unable to move/resize window.

    I have been using FF for a while now. My main computer was WinXP-32, though I recently bought a new laptop with Win7-64 installed. This problem was never experienced on my WinXP machine.
    Brief description of problem:
    After a time of having FF up and running, the minimize/maximize/restore/close buttons in the top-right no longer work as expected and, if not maximised, I cannot move the window around my desktop nor resize the browser window. When clicked, the buttons will
    rapidly flash on and off continuously without appearing to perform any noticeable function other than temporarily hogging CPU cycles. I've found that clicking (sometimes double clicking) in the main browser window then mousing over the buttons again seems
    to stop them flashing, though does nothing else.
    To minimize/maximize/restore/move/close the window(s), I have to right-click on the relevant tab in my taskbar and pick the desired option. Occasionally, however, even this doesn't work and the right-click menu will disappear as soon as I move the mouse
    over it after right-clicking. 'Show desktop' is a temporary fix for minimising windows and 'ALT + F4' or 'CTRL + W' for closing windows or tabs. This isn't satisfactory and to move or resize a window, I have to close the window in question (sometimes all other
    windows too), reopen it and do what I need to do, though sometimes even this is only a very short fix. If I have to close all the windows, FF will sometimes keep running for a while afterwards, even though no windows are actually open - simply ending the process
    via the windows task manager will fix this though is only a work-around, not a fix.
    One thing I have noticed is that if I manage to move the browser window (when not maximised), for a short period afterwards I can often resize the window successfully. This is more likely to occur if the browser window is not flush with the edge of my screen
    once moved.
    I've tried to include as much information as I can - most of which was determined after several minutes/hours of playing around with different scenarios, trying to manually reproduce particular problems or simply through sheer luck of happening to click
    in the right place at the right time! I hope there is a reasonably fix for this at some point in the not-too-distant future.
    I noticed in some of the threads at another site where people have voiced problems similar to mine, that a link to 'ObjectDock' was discovered in some cases. I do have 'ObjectDock 1.90 Plus' installed on my machine and use it in many ways and so decided
    to see if I could find a connection between the two. I have uninstalled, tested, and reinstalled both programs in a multitude of ways, though could find no conclusive correlation between having both bits of software running or installed at the same time and
    the problems I am experiencing. In my case, at least, this does not appear to be an answer.
    Also, in another thread on this site, someone suggested there might be a link with AVG Anti-Virus Free (I have version 9.0.819) though I've tried uninstalling it and its various add-ons in several different combinations, with no noticeable improvement.
    Sorry for such a long question... If you need to know anything more, just let me know!
    - James
    System Information:
    Operating System: Windows 7 (64 bit)
    Firefox Version: 3.6.3
    Application Basics
    Name
    Firefox
    Version
    3.6.3
    Profile Directory
    <button onclick="openProfileDirectory()"> Open Containing Folder </button>
    Installed Plugins
    about:plugins
    Build Configuration
    about:buildconfig
    Extensions
    Name
    Version
    Enabled
    ID
    Update Service
    1.2
    true
    [email protected]
    Java Console
    6.0.17
    true
    {CAFEEFAC-0016-0000-0017-ABCDEFFEDCBA}
    Adblock Plus
    1.2
    true
    {d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}
    Download Statusbar
    0.9.6.8
    true
    {D4DD63FA-01E4-46a7-B6B1-EDAB7D6AD389}
    Cooliris
    1.11.6
    true
    [email protected]
    FoxTab
    1.3
    true
    {ef4e370e-d9f0-4e00-b93e-a4f274cfdd5a}
    Save File to
    2.0.1
    true
    [email protected]
    1-Click YouTube Video Downloader
    1.4
    true
    [email protected]
    British English Dictionary
    1.19
    true
    [email protected]
    Tab History
    1.0.7
    true
    {84417002-6445-49b4-9fd7-1ef48240fa41}
    Universal Print
    0.4.23
    true
    {BE2100B3-1D80-48eb-ACCF-D26750644378}
    Active Stop Button
    1.3.0
    true
    {9e96e0c4-9bde-49b7-989f-a4ca4bdc90bb}
    Fission
    1.0.9
    true
    {1280606b-2510-4fe0-97ef-9b5a22eafe41}
    Smart Bookmarks Bar
    1.4.3
    true
    [email protected]
    Compact Menu 2
    3.1.1
    true
    {57068FBE-1506-42ee-AB02-BD183E7999E4}
    Menu Editor
    1.2.6
    true
    {EDA7B1D7-F793-4e03-B074-E6F303317FB0}
    Locationbar²
    1.0.5
    true
    [email protected]
    RealPlayer Browser Record Plugin
    1.0
    true
    {ABDE892B-13A8-4d1b-88E6-365A6E755758}
    AVG Safe Search
    9.0.0.812
    true
    {3f963a5b-e555-4543-90e2-c3908898db71}
    Searchbar Autosizer
    1.4.5
    true
    {655397ca-4766-496b-b7a8-3a5b176ee4c2}
    Open Bookmarks in New Tab
    0.1.2010043001
    true
    [email protected]
    Remove New Tab Button
    1.0
    true
    [email protected]
    New Tab Homepage
    0.4.2
    true
    {66E978CD-981F-47DF-AC42-E3CF417C1467}
    SwiftTabs
    0.3.6.8
    true
    {5F4EC95A-FFA8-11DE-898C-667D55D89593}
    Tab Kit
    0.5.8
    true
    [email protected]
    Hide Find Bar
    1.3.1
    true
    [email protected]
    Toolbar Buttons
    0.6.0.8
    true
    {03B08592-E5B4-45ff-A0BE-C1D975458688}
    Java Console
    6.0.19
    true
    {CAFEEFAC-0016-0000-0019-ABCDEFFEDCBA}
    View Cookies
    1.10.1
    true
    {8F6A6FD9-0619-459f-B9D0-81DE065D4E21}
    Adobe DLM (powered by getPlus(R))
    1.6.2.63
    true
    {E2883E8F-472F-4fb0-9522-AC9BF37916A7}
    Modified Preferences
    Name
    Value
    accessibility.typeaheadfind.flashBar
    0
    browser.history_expire_days.mirror
    180
    browser.places.importBookmarksHTML
    false
    browser.places.smartBookmarksVersion
    2
    browser.startup.homepage
    http://www.bath.ac.uk/
    browser.startup.homepage_override.mstone
    rv:1.9.2.3
    browser.tabs.closeButtons
    0
    browser.tabs.tabMinWidth
    77
    browser.tabs.warnOnClose
    false
    extensions.lastAppVersion
    3.6.3
    network.cookie.prefsMigrated
    true
    network.http.pipelining
    true
    network.http.pipelining.maxrequests
    50
    network.http.proxy.pipelining
    true
    places.last_vacuum
    1271706454
    privacy.sanitize.migrateFx3Prefs
    true
    privacy.sanitize.timeSpan
    0
    security.warn_viewing_mixed
    false
    security.warn_viewing_mixed.show_once
    false

    Hi Kossa,
    You can also check if the issue occurs in
    Clean Boot. If the issue disappears in the Clean Boot environment, you can continue to narrow down which entry is causing the issue.
    Besides, uninstall it and re-download
    a fresh copy of FireFox to check the result. If the issue still exists, create a new user account to see if it occurs.
    If the issue persists, you can contact Mozilla Support directly and use Internet Explorer (IE) during the time.
    J
    Please Note: The third-party product discussed here is manufactured by a company that is independent of Microsoft. We make no warranty, implied or otherwise,
    regarding this product's performance or reliability.
    Regards,
    Linda

  • How do i drag icons and how do i resize windows

    this is my first laptop having been used to emacs before. I can't figure out how to drag items or resize windows when not using a mouse and can't find such simple instructions in the manual.
    thanks.

    In addition to the method described by Jim, you can set options in the Keyboard & Mouse preference panel (in System Preferences) that allow you to get mouse clicks and click lock using the trackpad. Check out those options, many people find they make the trackpad a lot more useful.
    Randall Schulz
    iMac 20" Core Duo; MacBook Pro   Mac OS X (10.4.6)  

  • Bridge CC when copying resizes window to both monitors and enlarges all images to maximum size

    Bridge CC when copying an image resizes window to both monitors and enlarges all images to maximum size.

    Details, please.
    Please read this FAQ for advice on how to ask your questions correctly for quicker and better answers: 
    http://forums.adobe.com/thread/419981?tstart=0
    Thanks!

  • Resizing a movie in a window and it's sprites

    I'm working on a kind-of slide show project. The 'show' runs
    in a resizable window. The projector (created with Director v10)
    has a lot of sprites (>60). Most of them should not be resized
    and should stay at a fixed position (e.g. at the right margin),
    other sprites should be resized (e.g. the 'slide'). It is more or
    less as the Director authoring environment window where windows are
    docked.
    My question is if someone has a concept on how to deal with
    this. I appreciate any help.

    "ArmanIc" <[email protected]> wrote in
    message
    news:fjuiml$mj1$[email protected]..
    > I'm working on a kind-of slide show project. The 'show'
    runs in a
    > resizable
    > window. The projector (created with Director v10) has a
    lot of
    > sprites (>60).
    > Most of them should not be resized and should stay at a
    fixed
    > position (e.g. at
    > the right margin), other sprites should be resized (e.g.
    the
    > 'slide'). It is
    > more or less as the Director authoring environment
    window where
    > windows are
    > docked.
    >
    > My question is if someone has a concept on how to deal
    with this. I
    > appreciate
    > any help.
    Hi,
    I have a set of behaviours for that.
    They make a sprite keep its distance to the edge of the
    stage, and you
    can choose which edge (Left, Right, Top, Bottom). And then
    there is
    one other that sets a sprites position relative to the
    centre.
    I wrote them years ago for Dir 8, and are still in Lingo not
    Javascript.
    I could post them here, but they are not difficult to write,
    and
    besides, what is the fun? ;)
    Basically it goes like this:
    - store the starting position of the sprite or the offset to
    its
    reference (left edge, right edge...etc) on startmovie or
    beginSprite
    - detect the resizing of the window and send all sprites a
    message
    (sendAllSprites()).
    - in the sprites' handler, calculate the new position of the
    sprite
    and put it there.
    If you want to have them anyway, send me an email info
    looping nl.
    Good luck,
    Richard.

  • Downloading and installing windows media components for quicktime

    I am relatively new to Mac and haven't really installed much other than Handbrake. I was trying to install windows media components for quicktime or even windows media player for quicktime in order to play .wmv files. However, anytime I click to download something, NOTHING HAPPENS. No download appears, nothing goes to my download stack, nothing installs. Is there something I need to know when attempting to download and install something on my Mac that I may not just know coming over from the dark side of windows?
    any help is appreciated

    Yes, good advise...Flip4Mac is essential for WMV content. Here's a list of other things you might need for the various formats out there.
    VLC
    Real Player
    Perian
    Adobe Flash
    Streamclip

  • Sharing a link to Facebook, the "share" button is not available in the window and I can't resize to access it. How do I make it work?

    I have Windows 8.1, touchscreen. When responding to an issues email that then gives me the option to share on Facebook, the resulting share window does not format so that the share button is accessible to click or press. Thus, I cannot share anything. I have tried resizing the share window, but it just jumps around and never makes the button accessible.

    I understand that the share button on Facebook jumps around. Does this also happen in safe mode?
    '''Try Firefox Safe Mode''' to see if the problem goes away. [[Troubleshoot Firefox issues using Safe Mode|Firefox Safe Mode]] is a troubleshooting mode that turns off some settings, disables most add-ons (extensions and themes).
    If Firefox is open, you can restart in Firefox Safe Mode from the Help menu:
    *In Firefox 29.0 and above, click the menu button [[Image:New Fx Menu]], click Help [[Image:Help-29]] and select ''Restart with Add-ons Disabled''.
    *In previous Firefox versions, click on the Firefox button at the top left of the Firefox window and click on ''Help'' (or click on ''Help'' in the Menu bar, if you don't have a Firefox button) then click on ''Restart with Add-ons Disabled''.
    If Firefox is not running, you can start Firefox in Safe Mode as follows:
    * On Windows: Hold the '''Shift''' key when you open the Firefox desktop or Start menu shortcut.
    * On Mac: Hold the '''option''' key while starting Firefox.
    * On Linux: Quit Firefox, go to your Terminal and run ''firefox -safe-mode'' <br>(you may need to specify the Firefox installation path e.g. /usr/lib/firefox)
    When the Firefox Safe Mode window appears, select "Start in Safe Mode".<br>
    [[Image:Safe Mode Fx 15 - Win]]
    '''''If the issue is not present in Firefox Safe Mode''''', your problem is probably caused by an extension, and you need to figure out which one. Please follow the [[Troubleshoot extensions, themes and hardware acceleration issues to solve common Firefox problems]] article to find the cause.
    ''To exit Firefox Safe Mode, just close Firefox and wait a few seconds before opening Firefox for normal use again.''
    When you figure out what's causing your issues, please let us know. It might help others with the same problem.

  • How can I resize window????

    Hello,
    Please help me!!!!!
    How can I resize panel which is on a frame. There are texatarea, buttons on that panel, and when I maximize the window the components lose their positions on this panel???
    Thanks a lot!!!!!!!!!!!

    You've been told not to multipost before:
    [http://forums.sun.com/thread.jspa?threadID=5388567]
    I'm locking this thread. This is the last warning.

  • HTML-DB OAE Javascript to close current window and open a new window

    Hi everybody,
    We work with 1.6.
    What we want is to close the current window and open a new window with the URL mentionned in the window.open('http://www.cf.qc/pls/portal/PORTAL.....,'newwindow').
    The new window opening fires only once although we call it many times.
    Our javascript is:
    function closeTest()
    { alert('closeTest');
    if('&REQUEST.'=='QUITTER2'){     
    w = window.self;
    w.opener = w;
    w.close();
    window.open('http://www.cf.qc/pls/portal/PORTAL.home','newwindow','toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes');
    We call it on our application attributes :
    OnLoad="closeTest()"
    Thanks. Bye.

    Try this on for size:
    I have included two functions.
    windowRebuild() - opens a new window, maximizes it based on the screen size, removes all toolbars, and then closes the old window.
    myLocation(appName, pageName) - builds a url referencing an HTMLDB application, specfic to what server you are currently on. Very useful when you have an application on 3 different servers(dev, test, prod servers), you wouldn't want the server name hardcoded if you plan to export the app to another server.
    Also, you need to be careful when using &APP_ID. I am not completely certain how that is resolved at runtime, but I've found it only works when the javascript is in the HTML Header of a page and not stored in the template of the page.
    <script language="JavaScript1.1" type="text/javascript">
      This functions is for internal application use.
      Examples of myLocation:
      url = myLocation('&APP_ID.', 'APP_PUBLIC_PAGE');
      url = myLocation('MY_APP_ALIAS', 'MY_PAGE_ALIAS');
      url = myLocation('184', '10');
    function myLocation(myApp, myPage){
      var myHost = location.host;
      var newURL;
      newURL = 'http://'+myHost+'/pls/htmldb/f?p='+myApp.toString()+':'+myPage.toString();
      return newURL;
    /*  Function windowRebuild()
    *   This function will open a new window and close the old window.
    *   This function will also maximize the new window and remove all toolbars.
    function windowRebuild(){
       if(window.name != 'myAppWin'){
        var url = myLocation('&APP_ID.', 'PAGE_ALIAS');
        var myWin = window.open(url,'myAppWin','toolbar=0,scrollbars=1,menubar=0,status=1,resizable=1,location=0');
        window.opener = 'x';
        window.close();
       if(window.name == 'myAppWin'){
        window.moveTo(0,0);
        window.resizeTo(screen.availWidth,screen.availHeight);
    </script>Let me know if that works or you need some more explanation.
    Chris

  • Is there a way to open an image in a floating, resizable window?

    In previous versions of PDE I could open an image (or for that matter, multiple images) as floating, resizable windows.  Now, images seem anchored.  How can I detact them from the big editing screen, such that I can move them around the computer screen as I could in the past?
    Thanks,
    Haly2k1

      Open Editor and click Edit à Preferences à General
    Then check the box “Allow Floating Documents in Full Edit Mode”
     

  • How to tell if a movie is a reference after the fact and components issue..

    Hello,
    I am unsure if a quicktime movie I made is self-contained or a reference movie. It is not playing and I was told I need components to play it (though I am not sure which ones) .... but what got me thinking is I looked at the data size in the inspector window and it says 20 gb and the file size says 2 gb. Is there a way to know if it's a ref movie or self-contained?
    This will solve my first question, and of course my next is how do I get it to play? What do I need to install? How do I know what components are needed? It was exported as a DVCPRO HD 720p60. I have quicktime Pro - I think it's version 7.
    Any help would be greatly appreciated.

    I believe that the movie is self-contained...I am seeing (in the properties window, resources tab) the original movie pointing to one .mov file and ten .mov1-10 files underneath. Does that sound self-contained?
    No, afraid not. When I said "the file will point to itself," I meant the resource will be the same as the open file's physical location on your hard drive. If it is pointing to other files with different names/locations or to a URL on the internet, then it is a reference file.
    I don't have FCP on my system. Do you know what components for QT I need to install to playback the DVCPro HD movie? Is it possible to play such a file w/out having FCP?
    Sorry my answer was so vague. QT Kirk has already "nailed" the answer for you. You have to install the FCP application. This application will install an entire set of encoding and decoding "DVCPROHD" components. Since your system does not have FCP installed, you should ask whoever provided these files to either transcode the files to AIC/AIFF for editing on a non-FCP system or export their FCP completed project to a common distribution/delivery format like H.264/AAC.

Maybe you are looking for

  • Attach file to mail with "unusual" characters

    Hi I have made a procedure that can send mail with attached file/files. But when I attach a text file that contains characters like (Å, Ä or Ö) these characters gets like (A, A and ?) when I recieve the mail to my mail client. When I look at the file

  • Save As jpg / .iff?

    Im using PS CS6.  When trying to save a photo "Save As" a "jpg", the save as dialog box with the file name is automatically using the extension ".iff".  Im unable to save as a jpg file. Why is this happening and how can it be corrected?

  • Can you share playlists with adroid users

    My husband has an android phone & was wanting to use some of the music I have in iTunes.  Is there a way he can get the playlist exported to his phone???

  • Java.io.NotSerializableException: weblogic.ejb20.internal.EntityEJBContextImpl

    Hi, We are currently in the process of moving from Weblogic 6.1 SP5 and Toplink 3.6.3 to Weblogic 8.1 SP2 and Toplink 9.0.4 and during some test I have seen a "scaring" stack trace. It seems that, for some reason, a thing that "uses to work" failed w

  • How can I stop Script Errors in Firefox I have the Current Firefox

    Every time I start my computer i get script errors I start Firefox == This happened == Every time Firefox opened == weeks ago