Trapping the addition of ScrollBar on ScrollPane.

Hi All,
I have a Panel in which there is a JScrollPane(with JTextArea) and a button. On the click of button we add the components dynamically to the Panel. Now since the size of the Panel(inside a frame) will remain the same therefore adding components at run time will add ScrollBar to the ScrollPane(as it is reduced in size).
So what i have to do is to trap the moment at which the scrollbar comes into picture. That is when i keep on adding some components dynamically at run time so at some time the scrollbar will be added to scrollPane. All i have to do is display a message at the moment when the ScrollBar is visible.
I am stuck with this for almost a day....... Please help soon

What you can do (it's pretty ugly and I haven't tested it) is this :
- subclass JScrollPane
- override the createVerticalScrollBar() and createHorizontalScrollBar()
- in both overriden methods return a subclass of JScrollPane.ScrollBar instance in which you will have overriden the setVisible(boolean aFlag) method.
- in the setVisible method, you may test the value of the flag.

Similar Messages

  • Trapping the selected row in the table using boolean checkbox

    Hi,
    I am using Jdev 11.1.1.2.0 with ADF 11g.
    I have a screen that has a table with an additional column of 'Select boolean checkbox'. I have assigned a valuechangelistener method that helps me know which row has been selected. But the issue is it gets fired for all the rows in the table once I select/de-select a checkbox of 1 single row.
    How can I handle this? Yes I can iterate through the table rows and check the values of the checkbox. But that is not I want, I also want to trap the de-select event.
    What is the way to achieve this?

    Timo Hahn wrote:
    I don't see a bug in this behavior. This is because each row gets stamped when they render.
    The way to do this is to use an attribute (which can be transient) to hold the status of the check box. Exactly this does the link I gave.
    TimoHi,
    Why I am saying it as a bug is because it is not firing the event for the record where the event has occurred. instead the event is fired for each row which should definitely not what is expected. And because of this we have to add an additional variable.
    Now it becomes more complex if I have to handle de-selection as well, b'coz if the valuchangelistener is going to fire for all the records then I need to know which row was previously selected and now de-selected as now the de-selected record will also return a false.
    So any better solution, anyone?

  • When i open safari on my Imac if i also open an additional window, when i then close them down and reopen safari they both paper again.also if i then add additional windows the additional windows keep coming up too

    when i open safari on my Imac if i also open an additional window, when i then close them down and reopen safari they both paper again.also if i then add additional windows the additional windows keep coming up too

    If you are running v10.7 Lion, disable Resume >  How To Disable Lion's 'Resume' Feature - MacRumors.com

  • TS4498 Can i move my installation of Logic 10 to another hard drive, as its nearly full and i want to free up space so i can install the additional audio files too.

    Hi All,
           ....i've recently bought and downloaded Logic Pro X.........the software is great.......i love it. But when i bought it from apple, it gave me no choice where to install it. It just went ahead and installed it in the drive which has my operating system in it. Which, in itself is not a problem........but, in my case, the hard drive in question is almost full...........so when i decided to add the additional audio files which come with Logic...........a message was displayed that not enough free space is available for additional audio files.......please remove files to free up space!  
            I would love to free up space, but i only have a small 64gb SSD (which is where my operating system is installed). Normally, by moving files around (to another hard drive for example) would be the answer to this problem, but.........and here's the problem..........Logic, and my operating system cannot be moved to another hard drive, once installed it seems logic is there for good.
            Come on Apple!!!!!!!!!!.................i have a terrabyte of space on my other hard drive!! ready and waiting for some music files and or Logic!!!!  .........why on earth could you not of given me the option of an installation disk choice!!!!!
          .......well, it seems i'm stuffed now, and £130 lighter in the pocket. I could be the next Mody or Fat Boy Slim............but alas............it's not even looking like i'm gonna even be a one hit wonder.
         ........if anyone knows how to move logic to another destination drive, please help and when i'm famous, i'll sing at your wedding :-)

    The vast majority of applications must be install on the system drive in order to run correctly.
    Generally the applications take up very little disk space. It is usually the files they produce that need the space. Seeing as how I don't use Logic I can't do this but you might want to check how to move the files generated by Logic to another drive.
    Allan

  • Hello Apple community... I am trying to combine multiple pdf's into one, using preview, but when I drag the additional pages they show up as separate documents.

    I am trying to combine multiple pdf's into one, using preview, but when I drag the additional pages they show up as separate documents.  When I drag the doc in a line would show up in the past, and if I went above th eline all was good.  It doesn't have a line, and no matter what I try I am having no success.
    Please help!

    According to an Apple Support article, unless there are unforeseen issues
    in file ownership or permissions, the combining of .PDFs should be simple.
    •OS X: Combining PDF documents using Preview - Apple Support
    There are a few variable and similar methods, some change with version
    of OS X in use; some vintage OS X may vary a little in the process...
    A variety of similar topics appear in search results, with terms:
    " mac os x combine pdf into one " such as this page shows...
    https://www.google.com/?gws_rd=ssl#q=mac%20os%20x%20combine%20pdf%20into%20one
    If the system is older than Mavericks there may be other methods to try.
    Suggestions are among linked results in the search. I see a few fair ones.
    •Here's another that offers generally similar suggestions...*  this info looks OK, extra links, do not:
    http://osxdaily.com/2014/06/27/how-to-join-multiple-pdf-files-into-a-single-pdf- document-in-mac-os-x/
    { note: avoid clicking on links to products in * this ^ page, since they likely will not help & may be adware prone }
    If you have a problem after trying other methods, based on an OS X
    your computer is running, post back with more exact information...
    Good luck & happy computing!
    edited

  • HT4847 If you have several Apple devices feeding to the same iCloud account, is there an amount of storage made per device available free?  So that you are rewarded for the additional devices?

    If you have several Apple devices feeding to the same iCloud account, is there an amount of storage made per device available free?  So that you are rewarded for the additional devices?
    If this multi purchase if devices is not rewarded with a larger cloud storage being available, would it then be best to have several separate cloud accounts?
    Would you lose the ability to mesh data between devices???  Of could you choose to share a smaller part of the data and yet save the rest of the device data to their own cloud?  So in other words, split a devices stored data between 2 different icloud accounts?   One community iCloud account for partial data and individual account for data that does not need to be shared with the other devices, however it needs to be backed up.  The simpler solutions would be If you have several Apple devices feeding to the same iCloud account, an amount of storage made available per device (ie: 5 units of storage free per device)
    ~ So that you are rewarded for the additional Apple devices by giving 5 more units of storage or backup space per device

    Nobody here is an Apple employee, and my Christmas Season has been great, thanks very much. Neither am I jealous, I just abhor the fact that so many people these days expect more and more for free, in addition to what they already get for free. First world problems...
    Obviously Apple do consider people with multiple devices, since the whole purpose of the service is to keep data in sync across multiple devices. Clearly, after consideration, Apple decided to give 5GB of storage for free and provide customers with the option to buy more storage if they want/need more, in line with competing services.
    Everyone has their own set of unique circumstances but does that mean everyone should be rewarded with extras for free? At what point should it be considered acceptable to actually pay for additional extras you want?
    And by the way, somebody expressing a different opinion, and discussing people's expectations is not being rude. Aren't you from the country that supposedly takes 'freedom of speech' rather seriously?

  • Change the size of Scrollbar in JComboBox

    Hello,
    I want to change the width of Scrollbar that appears in JComboBox....any idea?

    Swing related questions should be posted in the Swing forum.
    You might be able to use the following. If it does work it would be for all scrollbars in your application:
    UIManager.put("ScrollBar.width", new Integer(...));

  • Where did the "Additional Content" patches go?

    I've installed Mainstage and all the free additional content, everything seemed to go perfectly.  But I don't seem to have any of the patches I expect to see - no french horn, no reeds, only a couple of bizarre horn patches, etc.
    It appears that the Orcestral Jam Pack installed properly, but the Patch Inspector and Patch Library don't show any of these patches as being availble.
    Any ideas?  Thanks in advance.

    Most of the additional content is not patches, but channel strip settings. Add a patch and then a channel strip. The browser for the channel strip settings will contain all these sounds.

  • How do I install the additional content file (PRE7_Cont_WWEFGJ) that I downloaded with Premiere Elements?

    Additional content for Premiere Elements 7 can be found by following the link in the article linked to at the end of this FAQ.
    You'll need to log in to your Adobe account, and then you'll see the link to the download on the same page as the Free Trial download.
    John Venediger received this from Tech Support, based on his problem installing additional content (including templates and themes):
    When trying to install/open the contents file (PRE7_Cont_WWEFGJ) you get this message - The setup has detected that premiere elements is currently in use. Please close Premiere Elements, then launch setup again despite the fact that Premiere Elements is not in use.
    To resolve this issue, please perform the following steps:
    1. Right-click the Microsoft® Windows XP® taskbar and select Task
    Manager.
    2. Under the Applications tab of the Task Manager, please ensure Adobe
    Premiere Elements or Photoshop Elements is not running in the background.
    3. If Adobe Premiere Elements or PhotoShop Elements is running in the background, please
    select the application and press End Task.
    4. Next, switch to the Processes tab and look for a process named Adobe
    Premiere Elements.exe. and Photoshop ElementsEditor.exe.
    5. If Adobe Premiere Elements.exe or Photoshop ElementsEditor.exe. is running, please select the process and press End Process.
    If you are still unable to install the additional content, please refer
    to our knowledge base document kb404997. Perform step 8 and try the
    installation again. Continue to step 7 if necessary. To access the
    document, simply copy the following and paste it in the address bar of
    your web browser:
    http://www.adobe.com/cfusion/tdrc/index.cfm?loc=en_us&product=premiere_elements

    Give Adobe Support a call or contact the TCS team at [email protected] - something in your environment is causing the installer to fail (I'd guess).

  • Im a Logic Pro X new user and Im having trouble once I download the additional content. I dont know how to use it. Is used as a plug in or what? Anyone who can help me I will be very greatful

    Although I can download the additional content im not able to use it as i dont know if this should appear as a new plug in or an audio unit.

    The additional content relates to the stuff that is already included with Logic. So, for example, when you download extra kits for Drummer, they go into the folder that has the So-Cal kit and the other kit that downloads when you do the intial install of Logic.
    Same with Bass instruments, Guitar instruments, Orchestral stuff. If you had a look at what came with Logic in the initial install, and then looked in those same places afterwards, there's a whole bunch more stuff in there.

  • Report Painter Library: troubles with new field in the additional structure

    Hi, ALL!
    I'm  creating a new field in the Report Painter table  GLFUNCT. Do do it I created my field in the additional structure GLDBZ  for GLFUNCT and create an row in the T804C table for new field.
    Who has expirience in customizing using T804* tables? What tables should be used and how? I have the following troubles:
    - I do not see the new field as characteristic in the library - I don't know the customizing table to set fields from additional structure as characteristic
    - in the generated Report Painter program  my new field exists  but call of filler routine is always disabled
    Thanks
    Tatiana

    Hi Shabitha,
    just wondering if you ever found an answer to this, as i'm searching for info on same matter.
    Thanks, Regards,
    Okan Yarligan

  • Can't install some parts of the additional content in Logic Pro X

    Hi,
    I've tried to install the Piano path and the Stereo Drum Kits from the additional content for more than a few times now without any luck. Every time the download is completed and the installation process begins I get an error message after a short time saying: "Logic Pro X was not able to complete the download". Note that this is after the download is completed. All the other downloads I've made from the additional content works great and I've got lots of space on the hard drive. What do you guys think I should do? Starting over with the download again and again doesn't seem to do the job.
    / Emil

    Just click loops , on the top of the panel click loops, and select "reindex all loops".
    http://support.apple.com/kb/HT5894

  • How to get the MAC address of the additional 10G NIC with ILO command line

    how to get the MAC address of the additional 10G NIC with ILO command line?
    thanks.
    This question was solved.
    View Solution.

    Hi Bruce,
    Out from what I can find on this network card is it not possible to get the mac address without a OS. I would recommend you to get/burn a Linux/Ubuntu live CD/DVD and run a Ifconfig in there.
    Hope it helps you.
    Best regards
    Zincas
    I work on behalf of HP

  • Process open items: how to set defaults for the additional selections

    Hi FI experts,
    Can anyone tell me if it is possible to set defaults for the additional selections in the processing of open items.
    I am using transaction F-04 (or F-06 or F-07) to post with clearing.
    When processing the open items I can use additional selection parameters. In my case I need to use the document type.  I would like to save this selection as a default but this doesn't seem to be possible.
    1. it is not possible to save a variant for the processing of open items
    2. I can not create a variant transaction (with trx. SHD0) for F-0x since this is only possible for dialog transactions
    Do you see another way to store defaults for the additional selections in open item processing?
    Thanks a lot.
    Dimitri

    Hi,
    When you create a transaction variant from FB05, then also you will not able to default the value for additional selections variable.  Hence SHD0 is not going to help.
    As said above, either you can change the additional selection screen parameters, but here again you can't default the value.  You can only reduce the number of entries on the screen.
    Else you can create a custom transaction code by copying the standard.  Even SAP recommends to create custom codes from standard tcode for clearing purposes depending on requirements. 
    Please check this link:
    http://help.sap.com/saphelp_erp60_sp/helpdata/EN/41/37b8e7455b11d182b40000e829fbfe/frameset.htm
    In the above link, in navigation choose clearing -- Specifications for processing open items
    If it is a custom transaction then you can default document number.
    Regards,
    Ravi

  • Display vendor name in the additional costs details for the PO

    Hi,
    I was wandering if there is any possibility to display vendor's name in the additional costs detail in the conditions tab in PO.
    As for standard, only the vendor number is shown.
    Regards.

    Hi,
    It is not possible to view the name of vendor there in "Addiitonal Data" screen for the condition type.

Maybe you are looking for

  • Installation problem under windows XP

    My PC runs under Windows XP. I want to install LabVIEW. The installer begins to copy files and displays the message "L'application n'a pa réussi à s'initialiser correctement (0xc0000142). Cliquez sur OK pour arrêter l'application). " (I've the french

  • How to hide the sub menus under tabs

    Hi, i have a requirement to hide the submenus(links) under tabs. i succeded to hide the tabs and global menus. but still menus(Links) are showing under the tabs. i wrote the below code OAPageLayoutBean page = pageContext.getPageLayoutBean(); page.pre

  • Extract URL from HTML text

    Suppose you have the following String that is body text with HTML. String bodyText = " My name is Blake. I live in New York City. See my image here: <img href="http://www.blake.com/blake.jpg"/> isn't my picture awesome? Tata for now!" I want to extra

  • GPS info in photo

    We took a picture at a small fruit stand in Puerto Rico. We'd like to send the owner a small gift. Is there'd a way to find the address from the GPS info in the photo?

  • Auto-Login into these forums here possible ? eMail of forum admin ?

    I would appreciate if there is an auto-login into these forums from Oracle. Currently every time I re-visit the forum pages I have to type in my login+passwd again. Usually in hundreds of other forums there is an auto-login option selectable. Does so