JScrollPane is no longer opaque! Please help.

I have recently upgraded from Java 1.2.1 to 1.3.1 and switched operating systems from win 98 to win 2000.
Since doing so I have run an application I have been working on only to find it has slightly changed visually, I don't know what has caused it!
Basically, I have a JTextArea held within a JScrollPane. The textarea is supposed to be opaque when the application loads, which is still fine, but now even though the textarea is transparent, you can't see the background. Instead all you can see is a large gray block within the limits of the scrollpane. I have tried switching the scrollpane to opaque, but unfortunately this does nothing - the gray stuff is still there.
I have included the problem code below, please note the code worked fine before, and the only issue here is that I arent getting the true transparency from these components that I desire:
notes = new JTextArea("Hi");
scrollPanel = new JScrollPane(notes);
     scrollPanel.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
     notes.setPreferredSize(new Dimension(250, 150));
             notes.setEditable(false);
             notes.setLineWrap(true);
             notes.setWrapStyleWord(true);
             notes.setFont(fontSmall);
             notes.setOpaque(false);
     notes.addFocusListener(this);
          gbConstraints1.gridx = 0;
          gbConstraints1.gridy = 1;
          gbConstraints1.gridwidth = 2;
          gbConstraints1.gridheight = 1;
          gbConstraints1.ipadx = 1;
          gbConstraints1.ipady = 1;
          gbConstraints1.insets = new Insets(2,2,60,2);
          gbConstraints1.fill = GridBagConstraints.BOTH;
     gbLayout.setConstraints(scrollPanel, gbConstraints1);
infoHidPane.add(scrollPanel);The line of code 'notes.setOpaque(false);' used to do all the work correctly but this is no longer the case. HELP.
Thank you for your time. Any comments or suggestions are greatly appreciated.

Hi!
I have the same problem. Here is something from the jdk 1.3.1 docs:
A common operation to want to do is to set the background color that will be used if the main viewport view is smaller than the viewport, or is not opaque. This can be accomplished by setting the background color of the viewport, via scrollPane.getViewport().setBackground(). The reason for setting the color of the viewport and not the scrollpane is that by default JViewport is opaque which, among other things, means it will completely fill in its background using its background color. Therefore when JScrollPane draws its background the viewport will usually draw over it.
You see that the Viewport is opaque by default. Probably, this is what needs to be changed. If you do have a solution do let me know too.
Regards,

Similar Messages

  • I updated to Mountain Lion and now my Parallels application no longer works; please help! What to do???

    I updated to Mountain Lion and now my Parallels application no longer works; please help! What to do???

    Make sure you have the latest version of parrallels. Think older versions are not compatible.

  • I am a OS10.7.4 user. yesterday i bought a Lacie external hard disk but error message appear said " You cant open the applicant LaCie setup assistant because PowerPC applicants are no longer support". please help me how to connect my mac with Lacie??

    i am a OS10.7.4 user. yesterday i bought a Lacie external hard disk but error message appear said " You cant open the applicant LaCie setup assistant because PowerPC applicants are no longer support". please help me how to connect my mac with Lacie??

    You do not need the Setup Assistant; in fact, you do not need any software on an external hard drive. I have two LaCie's; I erased the drive as soon as I plugged it in. You will need to format it anyway because most hard drives come Windows formatted. So, if you only want to use it with the Mac, highlight it in Disk Utility and choose Mac OS Extended (Journaled) as the format and the GUID Partition scheme under Options. While doing that, it will erase the drive (and get rid of the LaCie software) - once finished, your drive is ready to use for Time Machine or any other backup plans you have for it.

  • My iPhone 4 keeps asking me to enter the apple ID for an account which no longer exists-.please help

    my iPhone 4 keeps asking me to enter the apple ID for an account which no longer exists….please help

    I should have also said that the only reason this is causing me an issue is because I have bought a new phone and I want to sell this one.  But I cannot erase all data because I cannot turn off find my phone because it keeps asking for the password for an account which no longer exists…. have tried so many suggestions but nothing is working...

  • After updating my Macbook Pro retina display to os x yosemite 10.10.2, the mause and track pad locks, and do not respond especially when using the Mac for a long period, please help, how can I solve this, I do not like feel like in windows, so I paid

    after updating my Macbook Pro retina display to os x yosemite 10.10.2, the mause and track pad locks, and do not respond especially when using the Mac for a long period, please help, how can I solve this, I do not like feel like in windows, so I paid good money for this mack, I feel calm

    Hi Buterem,
    I'm sorry to hear you are having issues with your MacBook Pro since your recent Yosemite update. I also apologize, I'm a bit unclear on the exact nature of the issue you are describing. If you are having intermittent but persistent responsiveness issues with your mouse or trackpad, you may want to try using Activity Monitor to see if these incidents correspond to occupied system resources, especially system memory or CPU. You may find the following article helpful:
    How to use Activity Monitor - Apple Support
    If the entire system hangs or locks up (for example, if the system clock freezes and stops counting up), you may also be experiencing some variety of Kernel Panic. If that is the case, you may also find this article useful:
    OS X: When your computer spontaneously restarts or displays "Your computer restarted because of a problem." - Apple Support
    Regards,
    - Brenden

  • Can't find a playlist I created on my playlist or computer? I didn't delete it. I don't want to create it again because it took a long time. please help me find and recover.

    Can't find a playlist I created on my playlist or computer? I didn't delete it. I don't want to create it again because it took a long time. please help me find and recover.

    Playlists only exist as part of the larger iTunes library listing so if you are not seeing it there it doesn't exist anywhere else.  I know with my older version of iTunes it is very easy to accidentally delete a playlist.  With newer versions it may be possible to recover it with the undo feature in the menu but this likely will only work immediately after the deletion.

  • HT1751 Consolidating ITunes Library Failed - message received: "Copying files failed. The file name was invalid or too long" . Please help - how to i fix this issue?

    I consulted your website for details on how to back up my ITunes Library on my PC-found the article very helpful-I reached step 7 - clicked ok and the following message came up: "Copying files failed. The file name was invalid or too long."  Please can you help and advise what I should do or how to fix this issue.   My pc operating system is Windows 7 Home Basic

    You can select a group of tracks and consolidate from the right-click context menu. You coud try consolidating in batches, say all songs by artists beginning with A, then B, etc, then the other media types, until you can isolate a problem track and then try moving that by hand and fixing the broken link.
    I also have two scripts that could help you, Unconsolidated and ConsolidateByMoving. The first can make a playlist of all unconsolidated tracks, the second can consolidate a selection of tracks by moving them instead of copying.
    tt2

  • Problem creating ringtones - "song no longer available" - PLEASE HELP!

    I want to create a couple of ringtones from iTunes I downloaded. First I tried making one from a song contained in an album I bought and downloaded about a month or two ago. iTunes wouldn't let me (for whatever reason) so I bought and downloaded a new song. once it was in my "purchased" folder I added it to a songlist and then right-clicked it and selected "Create Ringtone." I was told I needed to go to the "Terms and Conditions" and accept the "ringtones" agreement, which I did. once I clicked "I accept" I was automatically redirected back to the song list that contained the song- there was never any option or utility to continue (after accepting the terms and conditions) on and make a ringtone from the song.
    NOW, when I right-click the song and select "create ringtone" I get a pop-up box that says that "this song can +*no longer*+ be made into a ringtone!" WHAT is the deal? What did I do wrong?
    Can someone tell me, step-by-step how to download a song and create a ringtone from it for my iPhone? Is there a tutorial with screenshots anywhere? Somone PLEASE help me out- I cant afford to keep buying songs just to try and figure this out on my own.
    Thanks.
    Nick
    P.S. On the iTunes webpage it said that songs that can be made into ringtones will have a ringtone icon next to them in my iTunes library; but that's not happening- even with the new song I just downloaded.

    -> Tap '''ALT''' key or press '''F10''' to show the Menu Bar
    -> go to Help Menu -> select '''Restart with Add-ons Disabled'''
    Firefox will close then it will open up with just basic Firefox. Now do this:
    -> Update Firefox to the latest version by going to Help Menu -> About Firefox -> click '''Check for Updates''' -> if an updated version is found then download the latest version and install it. After that follow these steps:
    -> go to View Menu -> Toolbars -> unselect All Unwanted toolbars
    -> click the Favicon on SearchBar -> click '''Manage Search Engines''' -> select all Unwanted Search Engines and click '''Remove''' -> click OK
    -> go to Tools Menu -> Add-ons -> Extensions section -> REMOVE All Unwanted/Suspicious Extensions (Add-ons) -> Restart Firefox
    You can enable your Known & Trustworthy Add-ons later. Check and tell if its working.

  • Ebay states "This Connection Is Untrusted" and has done for a long time - please help me use ebay again!

    For a long time now, every time I've tried to log in to ebay (I can get into ebay, but I cannot log into my account, etc) or Paypal (I cannot even access this site), I get an error message stating that "the connection is untrusted" "You have asked Firefox to connect securely to signin.ebay.com, but we can't confirm that your connection is secure".- I've tried the standard solution i.e. resetting the time and date on my computer, but still this does not work.
    Please help as this is severely restricting the use on my computer - and it's frustrating as hell!
    Many thanks

    Try to rename the cert8.db file in the Firefox profile folder to cert8.db.old or delete the cert8.db file to remove intermediate certificates that Firefox has stored.
    If that helped to solve the problem then you can remove the renamed cert8.db.old file.<br />
    Otherwise you can rename (or copy) the cert8.db.old file to cert8.db to restore the previous intermediate certificates.<br />
    Firefox will automatically store intermediate certificates when you visit websites that send such a certificate.
    If that didn't help then remove or rename secmod.db (secmod.db.old) as well.
    You can use this button to go to the Firefox profile folder:
    *Help > Troubleshooting Information > Profile Directory: Show Folder (Linux: Open Directory; Mac: Show in Finder)
    *http://kb.mozillazine.org/Profile_folder_-_Firefox

  • Remote Desktop Connection (RDC) No longer working - Please help!

    Ok... here we go.  I cannot RDC to my network at work.  I originally was using a PC and was able to connect a few times using RDC before it stopped working.  It would not connect either wirelessly or connected via ethernet cable no matter what I tried.  I then tried a laptop from work - same problem.  I then went and bought a new Macbook Pro - connected no problem 5 times in a row until it stopped worked again out of the blue.  
    In summary:
    - same problem exists on Macs and PCs
    - same problem exists when using Wifi or Ethernet cable
    - problem ONLY occurs at home with my FIOS router - all the same computers can RDC using any other network
    - if I connect to my neighbor's Wifi on either a Mac or PC, it's works fine
    Please help!!  I've been looking at my router settings but I'm over my head.  Any help would be greatly appreciated. 

    I am going to take an educated guess as to why, it does not work. If this does not solve the issue, please post,
    The solution was posted here by user "tns", from user BigDaddy on DSLReports:
    Login to your router normally, then click this link, which will take you to the now-hidden IGMP Proxy config page:
    192.168.1.1/index.cgi?active_page=6059
    If you are the original poster (OP) and your issue is solved, please remember to click the "Solution?" button so that others can more easily find it. If anyone has been helpful to you, please show your appreciation by clicking the "Kudos" button.

  • I can't get the Mac Tutorial videos to play !  I get a message from DivX Plus web player that " the file you are trying to play has failed to finish downloading and can no longer play "   Please help.

    I just bought a MacBook. The first few times it worked when I used the instructional video from teh default MacPage. Now when I try to watch a instructional video I get the message that teh file didn't finish downloading and  I ma unable to watch the video at all.
    Please help.

    This means that you have downloadd the file from the internet, and the file did not download completely so the computer can't play it. To fix this, just re-download the file and make sure it finishes.

  • 'find my ipad' enabled I cannot access the ipad as the use account originally set when new no longer exists, please help, now in DFU mode but still needs passcode!

    I have deleted my Apple ID from the apple store but had it previously associated with my Ipad, that I set 'to find' my ipad. but since i've deleted the orginal account I cannot access my ipad! The ipad is currently in DFU mode but still asks for a password, please help!

    Your Apple ID still exists with the most recent password that you used.  You can use it to erase your iPad. Read this.

  • I may have deleted something and now iPhoto won't load any longer.  Please help me

    I'm very new with my macbook pro and I have been using iPhoto from day one.
    However, I was messing around with the photos, and I deleted neccessary items for iPhoto unknowingly, now my iPhoto doesn't loat at all.
    It shows loading logo spinning but never load and screen is blank.
    Please help me get back my iPhoto.
    Thank you.

    Do you have any idea what you deleted? 
    Try this:  launch iPhoto with the Option key held down and try to create a new, test library.  If you can then the problem lies with the current library.
    If that's the case make a temporary, backup copy (if you don't already have a backup copy) of the library and apply the two fixes below in order as needed:
    Fix #1
    Launch iPhoto with the Command+Option keys held down and rebuild the library.
    Select the options identified in the screenshot. 
    Fix #2
    Using iPhoto Library Manager  to Rebuild Your iPhoto Library
    Download iPhoto Library Manager and launch.
    Click on the Add Library button, navigate to your Home/Pictures folder and select your iPhoto Library folder.
    Now that the library is listed in the left hand pane of iPLM, click on your library and go to the File ➙ Rebuild Library menu option
    In the next  window name the new library and select the location you want it to be placed.
    Click on the Create button.
    Note: This creates a new library based on the LIbraryData.xml file in the library and will recover Events, Albums, keywords, titles and comments but not books, calendars or slideshows. The original library will be left untouched for further attempts at fixing the problem or in case the rebuilt library is not satisfactory.
    OT

  • MacMail no longer compatible - please help

    Hi,
    Sometime ago MacMail was uninstalled from my system. I am currently using Leopard OSX 10.5.8 on a 2008 Macbook and I tried to re-install the MacMail application from my installations CDs, which it did. It installed version 3.4 of MacMail.
    However, when I come to open it, it says "you cannot use this version of Mail with this version of Mac OSX". To the best of my knowledge, 3.4 was the ONLY version I've ever had on my Macbook (like I say, it got uninstalled some time back as I didn't use it).
    I have tried the Software Update feature which does not prompt for anything and I do not know how to update/install a working version. I have read the other threads and nothing seems to be working. There is no "Mail.plist" in my library, and no other versions of Mail exist on my system.
    Please can anyone help me?? I need a Mail client and Thunderbird isn't cutting it. I also do not use MobileMe nor have Time Machine setup so there is nothing I can "jump back to" to restore it.
    Thanks

    Hi Jack,
    My PPC Mail App in 10.5.8 is 3.6, I think I'd try to reapply the big 10.5.8 Combo, as often the last Combos contains updates for Mail & such... it did in 10.4.11 anyway, then Repair Permissions & reboot...
    1058 Combo Update, 10.5.8...
    http://support.apple.com/downloads/Mac_OS_X_10_5_8_Combo_Update

  • Undoing 'Recently Closed Tabs' no longer available - please help!

    I find myself unable to access the 'undo closed tab' option, which I have previously found so useful. When I go to History > Recently Closed Tabs, the Recent Closed Tabs entries are greyed-out. How can I reactivate this essential functionality please?

    -> Tap '''ALT''' key or press '''F10''' to show the Menu Bar
    -> go to Help Menu -> select '''Restart with Add-ons Disabled'''
    Firefox will close then it will open up with just basic Firefox. Now do this:
    -> Update Firefox to the latest version by going to Help Menu -> About Firefox -> click '''Check for Updates''' -> if an updated version is found then download the latest version and install it. After that follow these steps:
    -> go to View Menu -> Toolbars -> unselect All Unwanted toolbars
    -> click the Favicon on SearchBar -> click '''Manage Search Engines''' -> select all Unwanted Search Engines and click '''Remove''' -> click OK
    -> go to Tools Menu -> Add-ons -> Extensions section -> REMOVE All Unwanted/Suspicious Extensions (Add-ons) -> Restart Firefox
    You can enable your Known & Trustworthy Add-ons later. Check and tell if its working.

Maybe you are looking for