JScrollPane scrollbar eats unnecessary space

Hi all,
i have a problem with the horizontal scrollbar of a JScrollPane.
My code is like this:
JPanel toolbarsPanel = new JPanel();
toolbarsPanel.setLayout(new BoxLayout(toolbarsPanel,BoxLayout.Y_AXIS));
JPanel northToolbarPanel = new JPanel();
northToolbarPanel.setLayout(new BoxLayout(northToolbarPanel,BoxLayout.X_AXIS));
JToolBar jToolBarMainCommands = new JToolBar();
jToolBarMainCommands.setLayout(new BoxLayout(jToolBarMainCommands,BoxLayout.X_AXIS));
JScrollPane mainCommandsScrollPane;
mainCommandsScrollPane = new JScrollPane(jToolBarMainCommands,JScrollPane.VERTICAL_SCROLLBAR_NEVER,JScrollPane.H
ORIZONTAL_SCROLLBAR_AS_NEEDED);
northToolbarPanel.add(mainCommandsScrollPane,BorderLayout.WEST);
toolbarsPanel.add(northToolbarPanel);
(the rest of the code includes 3 more toolbars; in total there are 2 toolbars in the upper side and 2 toolbars in the botom side of the toolbarsPanel)
The problem is that the size of the toolbar (or the scrollpane that contains it) includes the size occupied by the horizontal scrollbar in spite of the horizontal scrollbar not appering. And there is more, when the horizontal scrollbar appears the previous size get smaller and don't include space required for the scrollbar, overlapping the scrollbar upon the toolbar.
How can i compact my toolbar when the horizontal scrollbar is not needed and how can i show the scrollbar underneath the toolbar without overlapping with it.

Hi all,
i have a problem with the horizontal scrollbar of a JScrollPane.
My code is like this:
JPanel toolbarsPanel = new JPanel();
toolbarsPanel.setLayout(new BoxLayout(toolbarsPanel,BoxLayout.Y_AXIS));
JPanel northToolbarPanel = new JPanel();
northToolbarPanel.setLayout(new BoxLayout(northToolbarPanel,BoxLayout.X_AXIS));
JToolBar jToolBarMainCommands = new JToolBar();
jToolBarMainCommands.setLayout(new BoxLayout(jToolBarMainCommands,BoxLayout.X_AXIS));
JScrollPane mainCommandsScrollPane;
mainCommandsScrollPane = new JScrollPane(jToolBarMainCommands,JScrollPane.VERTICAL_SCROLLBAR_NEVER,JScrollPane.H
ORIZONTAL_SCROLLBAR_AS_NEEDED);
northToolbarPanel.add(mainCommandsScrollPane,BorderLayout.WEST);
toolbarsPanel.add(northToolbarPanel);
(the rest of the code includes 3 more toolbars; in total there are 2 toolbars in the upper side and 2 toolbars in the botom side of the toolbarsPanel)
The problem is that the size of the toolbar (or the scrollpane that contains it) includes the size occupied by the horizontal scrollbar in spite of the horizontal scrollbar not appering. And there is more, when the horizontal scrollbar appears the previous size get smaller and don't include space required for the scrollbar, overlapping the scrollbar upon the toolbar.
How can i compact my toolbar when the horizontal scrollbar is not needed and how can i show the scrollbar underneath the toolbar without overlapping with it.

Similar Messages

  • Why does Premiere Pro CS5 eat up space on my C drive when it conforms video files?

    Hey everyone. I have Premiere Pro CS5 with the latest update installed. I am running Windows 7 64-bit on a 120GB Corsair SSD drive. I have set my scratch disk video and audio previews to a different hard drive (F: drive). I have three questions:
    1. Why does Premiere eat up space on my C drive whenever it conforms the video files I import into my project?
    2. Where on my C drive can I find the folder that holds all these conformed video files that are taking up space on my C drive?
    3. How do I prevent Premiere from eating up space on my hard drive when it conforms the video files I import into my project? Is there some way to move whatever folder is eating up space on my hard drive when Premiere conforms the video files and tell Premiere to conform the video files on another hard disk so I don't lose precious space on my C drive?
    Okay, that's four questions but, can some please help me on this? Thanks.
    Okay, that's five questions.

    hello,
    i think you need to relocate you media  cache files to a separate drive other than your c: drive.
    in the hardware forum, Harm has done a wonderful job at advising on HDD setup, i think it mentions relocation
    of swap file, media cache, etc.  all which are defaulted to your c: in your user profile
    after relocating to different physical drives (all without partitions) performance usually increases
    Generic Guideline for Disk Setup  by harm
    hope this helps til someone else answers more
    good luck...
    j

  • Unnecessary space around table in an iview

    Dear all,
    Ive a simple model with only one table.
    After I compile the model and It is shown in a iView, the table is not centered inside the iView, instead, an unnecessary space is around the table (Right side and bottom), I mean, between the table and the limit of the iView there is a blank space which constrain the table to be at the center of the iView.
    Any help would be ok!
    Thanks in advance.
    Cheers,
    Andres.

    wa,
    The gaps around the sides are margins. The sizes of the margins are set in the Sheet Inspector. There are minimum margins, based upon what your printer driver has communicated to Numbers, where your printer is unable to print.
    Your table will split and flow onto multiple pages whenever it encroaches upon the margins. You can prevent this by not making the rows and columns quite so large, and by eliminating any unneeded ones.
    Jerry

  • Clean up unnecessary space

    Hi,
    My wIN 2008 SERVER is nearly out of space, as it has only 2.5 Gb left. It has Sql server 2012, Exchange 2010, inside. Is there any procedure to clean up any unnecessary space among that?
    Many Thanks & Best Regards, Hua Min

    Please see following discussions
    http://social.technet.microsoft.com/Forums/exchange/en-US/442d83d7-d989-4374-9e62-b7cdd731b1e9/how-to-clear-log-files-in-exchange-2010
    http://social.technet.microsoft.com/Forums/windowsserver/en-US/13da0ac2-0d95-4a19-802c-d11e632c6d73/how-to-cleanup-the-winsxs-folder-in-2008-r2?forum=winservergen
    http://blogs.technet.com/b/askpfeplat/archive/2013/10/07/breaking-news-reduce-the-size-of-the-winsxs-directory-and-free-up-disk-space-with-a-new-update-for-windows-7-sp1-clients.aspx?PageIndex=2#comments
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/0a7a7fc5-d30e-4841-8ed1-84676b575e55/sql-server-2012-how-to-shrink-the-database-transaction-log?forum=sqltools
    Regards, Santosh
    I do not represent the organisation I work for, all the opinions expressed here, are my own and posted AS IS.

  • Spotlight eating disk space os x snow leopard

    Hello,
    I have 2 major problems. The first is that Spotlight, for at least 1 or 2 years, has continually eat disk space on a half-hour basis. It would go from gigabytes and drain down to zero and then back up again and then down. This slows down my Mac Pro because the disk is continually writing. Sometimes it would stop if I restarted the computer but it would only be for a couple hours.
    I know that it is Spotlight because when I took my whole hard drive and dragged it to the "excluded" side in System Settings>Spotlight and it stopped doing what I mentioned above. I'm trying to find solutions that do not have to do with reinstalling Snow Leopard as I have so many things that I need to download of the internet and I have to keep doing so over and over everytime I re-install.
    Could it be something with the Spotlight plist? I've checked all my caches and they aren't large at all.
    2nd Major Problem:
    Spotlight is taking up over 20 gigabytes to index. Why?
    Thanks,
    spiral

    Erase the drive and reinstall Snow Leopard.
    Clean Install of Snow Leopard
    Be sure to make a backup first because the following procedure will erase
    the drive and everything on it.
         1. Boot the computer using the Snow Leopard Installer Disc or the Disc 1 that came
             with your computer.  Insert the disc into the optical drive and restart the computer.
             After the chime press and hold down the  "C" key.  Release the key when you see
             a small spinning gear appear below the dark gray Apple logo.
         2. After the installer loads select your language and click on the Continue
             button. When the menu bar appears select Disk Utility from the Utilities menu.
             After DU loads select the hard drive entry from the left side list (mfgr.'s ID and drive
             size.)  Click on the Partition tab in the DU main window.  Set the number of
             partitions to one (1) from the Partitions drop down menu, set the format type to Mac
             OS Extended (Journaled, if supported), then click on the Partition button.
         3. When the formatting has completed quit DU and return to the installer.  Proceed
             with the OS X installation and follow the directions included with the installer.
         4. When the installation has completed your computer will Restart into the Setup
             Assistant. Be sure you configure your initial admin account with the exact same
             username and password that you used on your old drive. After you finish Setup
             Assistant will complete the installation after which you will be running a fresh
             install of OS X.  You can now begin the update process by opening Software
             Update and installing all recommended updates to bring your installation current.
    Download and install Mac OS X 10.6.8 Update Combo v1.1.

  • Hindi font showing unnecessary spaces

    Hello! I am new here. I have hindi open type font. I can type in microsoft word 2007 without any problem with that font. But when I type in pagemaker 7.0, it inserts unnecessary spaces for zero width character such as " aa ki matra, ae ki matra, etc.". I think this is the problem with pagemaker not with with the font as I am able to type in microsoft word without problem. I have tried many possible settings such as hyphenation on/off, manual only, paragraph setting, character spaces with no success. I would be really very thankful for the help that I may get from the experts in this forum. Thanks

    Pagemaker is ancient and will only recognise the first 256 characters of a font.  It does not recognise all the characters of Opentype fonts.
    There are complex workarounds, but the long term and best solution, as indicated by others, is to move on to Indesign which has none of these problems.

  • How do I set up ITunes on Lap so that it downloads to an external hard drive and doesn't eat up space on my laptop?

    iTunes was eating up all my hard drive, so I bought an external hard drive
    Question 1:
    After I move the iTunes file over to the external hard drive, do I just move the file on my lap top to the trash folder and will that free up space on my hard drive?
    Question 2:
    If question 1 is good, the next time I down load a movie or song is there anything I need to do to get it to download to the iTunes folder on my external hard drive?

    http://support.apple.com/kb/ht1449
    This article will help you.
    1. Yes, you can trash the original folder. If you have a large media library, then yes you should free up a good chunk of space. However, you must also empty the trash. You can't just leave it in the trash or it will take up space. 
    2. Once you select the new media folder in iTunes as the article tells you, I believe all new downloaded media will automatically go to that new folder.

  • Locate rogue java process eating swap space.

    How can i find a rogue java process (lwp) eating up swap space ? The system is very low on swap but has half of memory free.

    I'd start with ps -e -o vsz,pid,args | sort -nThe process with the largest VM footprint will be on the bottom.
    How are you measuring that swap is being eaten? Are you using 'swap -s'? Is it mainly going into allocation or reservation?
    Darren

  • JScrollPane scrollbar look

    I'm working with JList which is in JScrollPane and would like to change the look of scrollbars. Like buttons, knob and tracker. How to do that.
    I apreciate any help/

    Hi,
    You can use the UIManager put method for that and replace the Thumbs by a new class of yours that extends JScroll bar thumbs and overrid the paint method of the Thumb...
    JRG

  • Flip4Mac eats disk space Even if i save to External

    I'm using Veoh. a program to download movies from veoh.com
    so i downloaded some and after they get downloaded. since they are WMV files, Flip4mac( a program to view wmv in quicktime)says "importing...." and as that happens it eats up diskspace from my Computter HD.
    But usually when Flip4mac says "Importing" it doesn't create copies of movies. it just loads the wmv into quicktime. SO why is it eating disk space

    Hmmm, let's try this for a start.
    Oh, are you using FileVault?
    Could be many things, we should start with this...
    "Try Disk Utility
    1. Insert the Mac OS X Install disc that came with your computer, then restart the computer while holding the C key.
    2. When your computer finishes starting up from the disc, choose Disk Utility from the Installer menu. (In Mac OS X 10.4 or later, you must select your language first.)
    Important: Do not click Continue in the first screen of the Installer. If you do, you must restart from the disc again to access Disk Utility.
    3. Click the First Aid tab.
    4. Click the disclosure triangle to the left of the hard drive icon to display the names of your hard disk volumes and partitions.
    5. Select your Mac OS X volume.
    6. Click Repair. Disk Utility checks and repairs the disk."
    http://docs.info.apple.com/article.html?artnum=106214
    Then Safe Boot from the HD, (holding Shift key down at bootup), run Disk Utility in Applications>Utilities, then highlight your drive, click on Repair Permissions, reboot.
    The usual reason why updates fail or mess things up, is if Permissions are not fixed before & after every update, with a reboot... you may get a partial update when the installer finds it doesn't have Permissions to change one obscure little part of the OS, leaving you with a mix of OS versions.
    Some people get away without Repairing Permissions for years, some for only days.
    If Permissions are wrong before applying an update, you could get mixed OS versions, if Directory is the slightest messed up, who knows!
    If many Permission are repaired, or any Directory errors are found, you may need to re-apply some the latest/biggest updates again, or even do an A&I if you have enough free disk space.

  • My JScrollPane scrollbar defaults to the bottom not top

    Hi,
    I have a slight problem with a JScrollPane in that it appears to default the scrollbar to the bottom when the scrollbar is visible. I basically have a panel on a JFrame containing a JTextArea within a JScrollPane.
    Does anyone know how I can make it default to the top ? I think I found a method that works on JScrollBar but can't seem to find one for JScrollPane.
    Thanks,
    Andy

    I've just tried this and it works great, thanks for that.
    I was looking for methods in JScrollPane to control the bar, never thought of the JTextArea class having the answer

  • Setting JScrollPane scrollbar status

    JScrollPane scrollR = new JScrollPane(textareavariable);
    scrollR.setVerticalScrollBarPolicyJScrollPane.
    VERTICAL_SCROLLBAR_ALWAYS};
    I need toset the vertical scrollbar at the bottom of the textarea so that the user will always to view the last record.
    How do I do that?
    Thank you!

    Is what you said what you really want? You've described a scrollbar that the user can't manipulate - taken literally the user will never be able to see anything except that bottom records.
    As a guess, you want the user to see the bottom record sometimes, but also to be able to scroll othertimes, no? When do you want the user to see the bottom record?

  • How do I find out whats eating my space?

    Hi
    I've just bought a new mac and l love it. The issue is that I uploaded photos (around 90GB's worth) from a USB disk but then the ipad some how managed to upload the same photos therefore duplicating all the photos this doubling the size of the total space taken by photos. So I turned of photostream, deleted all photos of both the mac and ipad and will repeat the process.
    However, I notice I still have 126GB of photos on the mac but I can't see where there are not photos in iphoto, none in the iphoto trash or none in the actuall trash can itself. I'm loaved to do a factory restore as its taken me two nights to get to where I am but not sure where this rogue 126GB is - appreciate any help.
    Thank you in advance
    Mike

    I would try OmniDiscSweeper (free download) http://www.omnigroup.com/products/omnidisksweeper/ and read this also: http://pondini.org/OSX/DiskSpace.html

  • Song tracks are not downloaded properly from iTunes Store: they are not added to the playlists, and eat disk space

    Hi,
    Yesterday I wanted to upgrade my wife's iPhone (5, 16 GB) from iOS 7.0.6 to iOS 7.1.
    She had only 500 MB of free space, and 1.9 GB was needed, so I decided to temporarily remove a number of songs from her music library.
    After this operation there was 2 GB free, and the upgrade went successfully.  After the upgrade there was still 2 GB free.
    Then I wanted to download the songs again, and here something went wrong:
    I went to iTunes Store > More > Purchased > Music, and clicked on "Download all".
    When the download process was completed, there was about 500 MB free space, but I noticed that some of the tracks, and even a complete album, were actually not in the playlists; in another album only one of the 30 tracks or so was downloaded.  So I went again into iTunes Store > More > Purchased > Music, and indeed some of the tracks were still marked as "to download", with a little cloud in front of them.
    When I tried to click on one of these little clouds to download a given track, the track seemed to be downloaded, but as soon as the download was finished the little cloud reappeared again, and the track wasn't added to the playlists.
    I tried to repeat that process a few times, until I noticed that there was now only 90 MB of free space.
    I then tried to download one more track that was 10 MB large, and after this there was only 80 MB of free space.
    So it seems that the tracks are indeed downloaded (and downloaded again if I click again on the little cloud) in a place where they use disk space without being otherwise accessible.
    What can I do to:
    1. download the tracks correctly so that they appear in the playlists?
    2. clean up the space that was wasted?
    Many thanks in advance!

    Depending upon what country that you are in (music can't be re-downloaded in all countries) then try deleting the incomplete tracks from your iTunes library and redownload them via the Purchased link under Quick Links on the right-hand side of the iTunes store home page on your computer's iTunes : re-downloading.
    If you aren't in a country where you can re-download music or if they re-download in the same state then try the 'report a problem' link from your purchase history : log into your account on your computer's iTunes via Store > View My Account and you should then see a Purchase History section with a 'see all' link to the right of it ; click on that and you should see a list of your purchases ; find those tracks and use the 'Report a Problem' link and fill in details about the problem (iTunes support should reply within, I think, 24 to 48 hours).
    Some people have had a problem with the 'report a problem' link (it's been taking people to this site on a browser instead of showing a form in iTunes) - if it does that to you then try contacting iTunes support via this page : http://www.apple.com/support/itunes/contact/- click on Contact iTunes Store Support on the right-hand side of the page.

  • IBooks Author versions eating disk space

    Hello
    running iBooks Author Version 2.2 on Yosemite 10.10.3
    It seems that the automatic saving does not save only the changes to the project, but the whole project every time.
    On a big project that consumes GBs of disk space.
    In earlier versions of iBooks Author you were able to delete non used versions from within the App:
    Why is iBooks Author using up my scratch disk space?
    I found out where the versions are saved (in a hidden folder where you have no privilegies).
    I gave myself the privilegies needed and deleted 1 of the earlier versions...
    Not a good idea...
    If i go to File -> Revert (maybe bad translation from German) the App hangs an blocks the whole system...
    Has anybody found a solution to recover disk space used by iBooks Author versioning?

    Your computer but....are  you working on a network at the school or in your home with  your own  net connection?
    Networks have exclusions set  by the IT department to prevent misuse.
    A book exported to PDF , should  show teh  book content , albeit, slighty different to what your see in iBA or iBooks when previewed.  Again, it  if you are on a network, there may be issues.
    Run a text with a default template saved from iBA and see what the result  is.

Maybe you are looking for

  • Original software with G4 400

    I have been trying to find out exactly what software comprised the original bundle that came with the PowerMac G4 400. This has turned out to be a lot more difficult than I had expected, even though have the original packaging and documents. I own on

  • Authorization Object to Control access for ContactData in Dispute Managmt

    Hello Experts, Do you know which Authorization Object is necessary to use to be able to control Contact Data available in Dispute Management? Any hint will be much appreciated. I want to have greyed out the contact data fields (contact person, e-mail

  • ERROR While network creation

    Hi Experts, While creating the network for any WBS in my project , it is giving an error msg "No parameters for network type PS05 exist (Check entry)." I checked it in network profile, the network type is assigned there.Please tell me how should i pr

  • Airport extreme not detecting ethernet from modem

    Hello everyone, I'm hoping someone can help me out with this because I give up on trying. I have a 5th generation Airport Extreme hooked up to a Ubee D3.0 cable modem and I use it for my home's wifi. Recently, the AE stopped working (blinking amber l

  • Safari text link extension ?

    Is there any extension available for safari 6.0.4 that works like text-link on firefox / ie , "Allows URI texts written in webpages to be loaded by double clicks." Can't see anything obvious ! Cheers Brian.