Is there a way to set divider location of jSplitPane?

I am trying to set the divider of my splitpane to have only two locations where the left panel is expaned or contracted.
I have set the splitpane enable(false); and oneTouchExpandable(true);
This is how the left panel looks contracted:
http://hal.humberc.on.ca/~rtsj0002/panel_contracted.jpg
and this is how the left panel looks expanded:
http://hal.humberc.on.ca/~rtsj0002/panel_expanded.jpg
how can i avoid the left panel expanding to this:
http://hal.humberc.on.ca/~rtsj0002/panelsize_unwanted.jpg
btw it is being loaded from another class containing the main()
here is my code:
http://hal.humberc.on.ca/~rtsj0002/help.java
thanks for any help

You should be able to do it. First, the hard wayimport javax.swing.plaf.basic.BasicSplitPaneUI;
import javax.swing.plaf.basic.BasicSplitPaneDivider;
  BasicSplitPaneDivider divider = ((BasicSplitPaneUI)jSplitPane1.getUI()).getDivider();
    divider.addComponentListener(new java.awt.event.ComponentAdapter() {
      public void componentMoved(ComponentEvent e) {
        // code to move the divider back if isn't where you want it
    });This is going to be hard for two reasons.
1. You have to figure out where you don't want the divider and once you figure that out, you have to figure out where you want it.
2. Actually moving the divider will call this method again! Maybe this won't matter if the code for 'is the divider out of bounds' works OK, but it's an issue.
The easy way.
setOneTouchExpandable(false);
Add another button with the symbol '<' or somesuch. When the button is pressed, move the divider to the left and change the symbol to '>'. If the button is hit again, move the divider to the right and change the symbol to '<'

Similar Messages

  • HT1688 Is there any way to set password to protect the location service, to keep GPS open? so, the theft cannot turn it off so easy, because once the location service is turn off, all GPS track is useless...

    Is there any way to set password to protect the location service, to keep GPS open? so, the theft cannot turn it off so easy, because once the location service is turn off, all GPS track is useless...

    That is what Activation Lock of iOS 7 does
    In addition, it renders the iPhone totally useless to anyone who doesn't know your Apple ID and password.
    Allan

  • Is there a way to set my settings in the latest version of Firefox so I can still zoom using the trackpad?

    I have a MacBook. In previous versions of Firefox I could zoom in or out using my trackpad. Is there a way to set my settings in the latest version of Firefox so I can still zoom using the trackpad?

    Some gestures have been removed in Firefox 4.
    You can restore the zoom feature by changing the values of the related prefs on the <b>about:config</b> page.
    browser.gesture.pinch.in -> <b>cmd_fullZoomReduce</b>
    browser.gesture.pinch.in.shift -> <b>cmd_fullZoomReset</b>
    browser.gesture.pinch.out -> <b>cmd_fullZoomEnlarge</b>
    browser.gesture.pinch.out.shift -> <b>cmd_fullZoomReset</b>
    browser.gesture.pinch.latched -> <b>false</b>
    To open the <i>about:config</i> page, type <b>about:config</b> in the location (address) bar and press the "<i>Enter</i>" key, just like you type the url of a website to open a website.<br />
    If you see a warning then you can confirm that you want to access that page.<br />

  • Is there a way to set firefox so it only allows access to only one website / (ip address).

    Is there a way to set firefox so it only allows access to only one website / (ip address) and block traffic from everything else (the entire web) other than the one site I want to allow? The site I want to allow is a corporate web application that will only work in firefox. We as a business run a windows server and all client desktops run Internet Explorer with security setting controlled by group policy. We have already locked down the security setting in firefox so users can’t bypass the proxy server settings.

    I have a proxy server set up (Symantec.cloud). Fire fox is “locked” so users would find it difficult to bypass it.
    I have a file: '''local-settings.js '''
    This is located in: C:\Program Files (x86)\Mozilla Firefox\defaults\pref
    The content of this file is:
    ''pref("general.config.obscure_value", 0); // only needed if you do not want to obscure the content with ROT-13
    pref("general.config.filename", "mozilla.cfg");''
    I also have the file: called: '''mozilla.cfg'''
    This is located: C:\Program Files (x86)\Mozilla Firefox
    The contents of this file is:
    lockPref("network.proxy.type", 5);
    All that is working fine, users can’t easily change the connection settings.
    So all that is good and works…
    What I would also like to do is set firefox so access is limited to 1 IP address and nothing else is allowed (the whole internet is blocked, except this one IP address).
    You suggest using a PAC file - I was unsure how I would use a PAC file, (I have never written one) and do not understand how I would implement one? Please help.

  • Is there any way to set up icloud with Windows XP?

    Is there any way to set up icloud using a PC with windows XP?

    Yes there is.
    There are many threads on this forum discussing this issue already (it's good to search before asking the same quesiton again).
    There is a simple hack to get iCloud control panel to work on Windows XP to give you synced access to Contacts, Calenders, Reminders and Bookmarks. It also can be used to set up your me.com mail. Photostream doesn't work.
    I found a solution here, have written it up in clearer english and added details re IMAP support for me.com addresses here:
    http://xlii.be/s/1ii
    In summary:
    You need:
    Unpacking program e.g. 7-Zip or WinRar
    Orca MSI editor
    The iCloud setup hack for Windows XP:
    Download iCloud Control Panel for Windows.
    Open iCloudSetup.exe file with WinRar or 7-Zip and extract.
    Navigate to and open the iCloud.msi or iCloud64.msi (for 64bit systems) with Orca.
    In the left table select LaunchCondition. Then change in the right table “VersionNT> = 600” to “VersionNT> = 200” and Save.
    Run modified iCloud.msi and install.
    Run iCloud Control Panel, located in the Windows Control Panel, and set up as you want.
    I've had reports that you need to keep the files extracted from the .exe file in the same directory during installaton of the .msi file.
    Have fun!

  • Is there a way to set a default solution .runsettings file in VS2013?

    This is a question my coworker asked over on StackOverflow
    [here], but hasn't received a single comment or answer. Thought I'd repost it here since I know the VS guys are more likely to see it here...
    I'm using VS2013 with the built-in unit test framework. I've created a .runsettings file that sits in the Solution Items folder. When I select Test -> Test Settings -> Select Test Settings File, I am able to choose my .runsettings file and it works
    as expected.
    When I exit out of VS2013 and then re-load the project, I have to re-select the .runsettings file. Is there any way to set the default .runsettings file at solution level so it gets persisted?

    Hi,
    I can’t get your issue on my side(VS2012 Update 4 machine and VS2013 Update 1 RC machine). If you are using VS2012, please upgrade it to VS2012 Update 4. If you are using VS2013, please upgrade it to VS2013 Update 1 RC.
    When I restart VS and re-load the project, the .runsettings file is still selected
    with the Select Test Settings File menu option and .runsettings file is still used when I run the unit test.
    I doubt that there is anything wrong with your VS. As I mentioned above, please reset your VS settings through Tools->Import and Export settings->Reset all settings…
    If no help, try some other devenv commands to fix:
    1.devenv.exe  /safemode
    2.devenv.exe  /resetskippkgs
    3.devenv.exe  /installvstemplates
    4.devenv.exe  /resetuserdata 
    devenv.exe can be located under your VSlocation/Common7/IDE
    What your need is to put it to run prompt and add commands to it.
    If the issue still exists, please repair or reinstall your VS.
    Meanwhie, if you have some anti-virus software running when you work with VS, please close them to check the reuslt.
    Best regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Is there any way to set global language as english for users  in portal

    Hi,
    Is there any way to set global language as english for all the users  in portal (for all the screens,applications etc) irrespective of browser settings,language in jco,user settings in backend .
    the reason why i am asking is we are implementing global implementation project and for some users in switzerland because of their browser is not english they are getting language other than english.we dont want to ask each user to change their browser language.we just want to force the portal to display content only in english
    Thanks
    Bala Duvvuri

    Hi ,
    You can add property  'request.mandatorylanguage=<your_language>'
    and property  'request.mandatorycountry'
    on file 'prtDefault.properties' located in :
    ..server0\apps\sap.com\irj\servlet_jsp\irj\root\WEB-INF\portal\system\properties\prtDefault.properties
    Then restart the server.
    See :
    http://help.sap.com/saphelp_nw70/helpdata/EN/42/938297a5061d69e10000000a1553f6/frameset.htm
    Regards,
    Gilad

  • My husband and I are using the same computer. He has a ton of songs in iTunes that I don't want...but when I sync my iPod I get all of his songs too. Is there a way of setting up another ITunes account without having to untick all of the ton songs iTunes

    My husband has a ton of songs in iTunes that I don't want on my iPod nano. Is there a way to set up a separate account on the same computer in iTunes? Do I have to un-tick all of his songs (would take forever!! And then he would have to tick them again)....when we sync our iPods?

    No. Its not possible.
    Alternatively, create another user account in your computer. Install iTunes in that account with the library you wish to sync.

  • My wife and I share an iTunes account. Is there any way to set up a seperate one for her to sync her phone contacts, iCloud and music to without having to purchase all her music again and then share going forward?

    My wife and I share an iTunes account. Is there any way to set up a seperate one for her to sync her phone contacts, iCloud and music to without having to purchase all her music again and then share going forward?
    It would be so much easier having seperate accounts but we have hundreds of her purchased songs on my account and she would need to be able to access these from her account. Possible?
    Also, if we bought a song in future we would want to be able to both have access to it.
    Alternatively, what is the easy way to sync two distinctly different contact lists to one iTunes account?
    Thank you in advance.

    FYI: iTunes account (used to make purchases) is not the same as iTunes library (iTunes on your computer with music, movies, etc.).
    ecbclb wrote:
    Will we have to create a seperate account for her, or can we all have the same one?
    You can but you will not be able to limit what she syncs.
    I would like to avoid 'checking' and 'unchecking' individual songs every time one of us tries to synch our ipods to the library.
    I don't recommend using (only) the checkmarks to select what to sync.
    Each of you can create your own playlists then sync only those playlists.
    Then add/delete from your own playlists to change iPod content.
    The only time I uncheck items is if I rarely/never want to sync them to anything, such as Christmas music or old audiobooks.
    I suggest you each have your own computer login account. Then everyone has their own contacts, calendars, and everything else.
    You and your husband can share an iTunes library and let your daughter have her own.

  • I have an iTunes account with my own music library.  My wife wants to have her own music library.  Is there a way of setting up a sub account for her, or do I have to set of husband playlists and a separate set of wife playlists?

    I have an iTunes account with my own music library.  My wife wants to have her own music library.  Is there a way to set up a sub account for her, or do I have to set up a set of husband playlists and a set of wife playlists?

    Sorry, but that's not possible.
    You can share iTunes libraries on a network >  iTunes: Setting up Home Sharing on your computer

  • Is there a way to set wireless network priority on iphone? If not, there should be!

    Is there a way to set wireless network priority on iphone? If not, there should be! I have a wireless router with dual band signals, as well as an extender at the other end of my home... it would be nice if I could set a priority list so my phone knows to always connect to the 5GHz signal if available, rather than trying to connect to the 2.4GHz signal which is on the other side of the house...

    By default, the iPhone will prioritize Wi-Fi over cellular for data and when doing Wi-Fi, will latch on to the strongest signal it can associate (latch on) to. But all that is automatic, there's no evident control for manual adjustments. Other than deleting the Wi-Fi networks you don't like.

  • I want to use Mac Mail for my work email address, which containts multiple outbound options (i.e. hr@, me@ etc). Is there a way to set up Mac Mail to have an account with multiple outbound addresses rather than adding in multiple accounts?

    I want to use Mac Mail for my work email address, which containts multiple outbound options (i.e. hr@, me@ etc). Is there a way to set up Mac Mail to have an account with multiple outbound addresses rather than adding in multiple accounts?

    This sounds like the age old problem with keychain & Safari. I don't know of a way to solve it without using something like 1Password.
    The iOS app has it's own built in browser, so it has more control over what gets autofilled. Safari on OS X has an 1Password extension that handles account selection & autofill etc.
    Keychain is great in principle, but it quickly falls down when you need tight integration with many ID's & different use cases (work, home etc).
    I'd suggest you submit feedback to Apple about your thoughts. I did so years ago about this issue & this is how far we have come (back to the point where me.com synced passwords) :^)
    http://apple.com/feedback/macosx.html
    Other tools like lastpass or keypassx may also help if you want to truly segregate password storage, but that doesn't fix autofill, the way around that issue is to dedicate one browser for work.

  • Is there a way to set the default level of keyframe easing?

    I'm currently using the graph editor to smooth my ease-in / ease-out keyframes with 100% influence.  I'm having to adjust the easing of each keyframe individually. 
    Is there a way to set the default level to 100%, so that I can just select "Easy Ease In" and have it apply without having to go into the graph editor?  It would save a lot of time.

    No, there's not a way to do that, but it's a good feature request. You can submit feature requests here:
    http://www.adobe.com/go/wish

  • Is there a way to set which keychain item is used by default for a site/application?

    This question applies primarily to the keychain in Mavericks, but also the iCloud keychain and its use in iOS.
    There are several sites and services for which I have multiple logins that serve different purposes. Whether it's because they are business/personal accounts, or accounts that pertain to different functions, I have multiple logins for many sites/services I use daily, however, there is usually one primary account for each that I use for most purposes.
    What I would like to be able to do is set which of these logins appears by default. An example scenario might be if I have an "admin" account on a site, and a "dev" account that is used for testing purposes to Q/A the site from the perspective of a user who doesn't have administrative access. Most of my work happens under "admin" but whenever I go to the login page, the "dev" account prepopulates in the login form and I have to start typing admin and select that. It also does this on my iPhone, which is where this issue becomes very cumbersome, because there is no dropdown for me to select which credentials to use to autofill from. It appears to only allow autofill from whatever it sees as the first account to come up, and I can't seem to change that without deleting all the other keychain items that come up ahead of the one that I want. This kind of thing also poses a significant risk of accidents if, say, I have multiple payment methods saved and the one that comes up by default isn't my personal payment method, but a business account that's only meant to be used for business purchases. If that comes up first, if I don't replace it with my personal details, I might accidentally place a personal charge on a business account.
    So I really have 2 questions:
    1) Is there a way to set the priority order of which account populates a form by default from the keychain?
    2) When filling out credentials on iOS, an "autofill" button appears at the top of my keyboard, and I can begin typing in a field and it will show the autocomplete of the username that I am typing, but if I click autofill, it replaces it with the original credentials and not those of whatever I began typing in. If I click on the username it's autocompleting, it just clears the autocomplete. Is there some way to choose which username I'm autocompleting a form with?
    Thanks to anyone who has any ideas about a solution to this, and if there isn't, and if anyone at Apple is listening, in an ideal world, it would be like setting the priority order of known wifi networks, where you can drag your first choice to the top of the list.

    This sounds like the age old problem with keychain & Safari. I don't know of a way to solve it without using something like 1Password.
    The iOS app has it's own built in browser, so it has more control over what gets autofilled. Safari on OS X has an 1Password extension that handles account selection & autofill etc.
    Keychain is great in principle, but it quickly falls down when you need tight integration with many ID's & different use cases (work, home etc).
    I'd suggest you submit feedback to Apple about your thoughts. I did so years ago about this issue & this is how far we have come (back to the point where me.com synced passwords) :^)
    http://apple.com/feedback/macosx.html
    Other tools like lastpass or keypassx may also help if you want to truly segregate password storage, but that doesn't fix autofill, the way around that issue is to dedicate one browser for work.

  • My wife and I both have the new iPhones.  Is there a way to set up two separate iCloud accounts but have photo stream from both phones sync with one family mac?  So we don't want to share contacts or anything else, just photos... Thanks in advance

    My wife and I both have the new iPhones.  Is there a way to set up two separate iCloud accounts but have photo stream from both phones sync with one family mac?  So, we don't want to share contacts or anything else, just photos... Thanks in advance

    If you turned off Contacts wouldnt that mean that the Contacts would no longer be backed up to iCloud as well? That would make it a pain when upgrading a phone to not easily pull contacts back down.

Maybe you are looking for

  • How do you change the color of text messages?

    Can you change the color of text messages?  If so, how?

  • Some Hindi characters fail in pdf

    I work mostly with Indian langauges fonts and have ttf (and some ATM) fonts. When I try to make pdf for printing purposes, some characters do not appear in pdf. I found from the character map that they are equivalent to "no-break space" character. I

  • What are some of the tables in financial budgeting module?

    Hi all, Please could you give me the names of some exits (menu, screen etc) and tables used in Financial budgeting and FI/CO modules. Thanks. Charles +++++++++++++++++++++++

  • DO NOT UPDATE ITUNES OR QUICKTIME!

    there is a serious bug in it. it creates registry files that cannot be accessed. if you update quicktime to version 7.0.4 or later, there is a good chance that you will not be able to update your ipod!! just a warning for everyone. dont do what i did

  • Interfaces - Process chains

    hI, can anyone help me how i can check these interfaces to convert my infopackagegroup to process chain RSPC_MIGRATE_INFOPACKAGE_GROUP(to convert infopackage group to a process chain) RSPC_MIGRATE_EVENT_CHAIN ( to convert an event chain to a process