Swing JComboBox causes scrolling problems in applet

I have an applet with a JPanel that contains a JComboBox that lists font selections for a JTextPane in a JPanel below it. It contains about 12 items, of which only five are visible at a time. If I choose any of the first five and scroll the page on which the applet is running, there are no issues. However, if I scroll the page after scrolling down the list to the sixth item, regardless of whether or not I actually select it, it causes the graphics in the applet to corrupt. The JComboBox code is:
private JComboBox getFontFaceCB() {
               String[] fontNames = new String[fontlist.length];
               for (int i = 0; i < fontlist.length; i++){
                    fontNames[i] = fontlist.getFamily();
               if (fontFaceCB == null) {
                    fontFaceCB = new JComboBox(fontNames);
                    fontFaceCB.setBackground(Color.white);
                    fontFaceCB.setPreferredSize(new Dimension(150, 30));
                    fontFaceCB.setMaximumRowCount(5);
                    fontFaceCB.setSelectedIndex(0);
                    fontFaceCB.addItemListener(new java.awt.event.ItemListener() {
                         public void itemStateChanged(java.awt.event.ItemEvent e) {
                                        currentFont = fontlist[fontFaceCB.getSelectedIndex()];
                                        StyleConstants.setFontFamily(textStyles, currentFont.getFamily());
                                        jTextPane.setCharacterAttributes(textStyles, true);
                                        viewWidget.repaint();
               return fontFaceCB;
          }This also happens if I set the default index to something that one must scroll down to reach (e.g. the sixth index) I was wondering if anyone else has come across this issue and has any idea as to how this may be resolved.
Also, if the window is minimized, resized, etc. the graphics also corrupt, but only after the aforementioned condition.
Edited by: BANZ111 on Dec 12, 2007 3:59 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

I have found the solution:
I had lightweight components intertwined with heavyweight ones, which, until now, I never regarded as being a possible source of problems. Apparently, when you scroll down a JComboBox, it changes from light to heavy weight? At any rate, I found this with a lot of other useful tips here:
http://72.5.124.55/javase/6/webnotes/trouble/TSG-Desktop/html/gchzf.html#gdldq
Perhaps this can be of use to anyone else who gets a similar problem.

Similar Messages

  • HT202020 Using a SDHC card adapter I can import directly on my iPad2 videos (.mov) taken with a Panasonic DMC-ZS3. The same video files (same file format) imported in Aperture 3.3 cannot be synchronized with iPad. Is Aperture causing the problem?

    Using a SDHC card adapter I can import directly on my iPad2 videos (.mov) taken with a Panasonic DMC-ZS3. The same video files (same file format) imported in Aperture 3.3 cannot be synchronized with iPad. Is Aperture causing the problem?

    Oh, baby! This bad boy flies!! Here's what to expect:
    I had 40,000 images in Aperture 3 and it was dog slow at everything. I installed 3.1 update today. It took 5 minutes to update the database and then behaved marginally better than before at ASIC library navigation. I was disappointed.
    Then I QUIT the app. It took a couple of hours to "update files for sharing" with a counter that went to 110,000 images. So it must have updated every thumbnail and variation of preview. Turned it back on , and BAM. Came up fully in seconds. Paused for 10 seconds ten everything was lickrty split. For the first time ever, I can use the Projects view with all 791 projects and scroll quickly. I even put it in photos modevand whipped thru all 49,000 images!
    Haven't done anybprocessing yet, but i'm liking it!!
    Jim

  • Internet Explorer Scroll Problem

    Hi, I have run into a major issue with internet explorer and my new website. If you have a way to check this out on internet explorer than i would greatly appreciate it. What it is is like a choppy, shutter effect when a person scrolls down the page. (You can check it out for yourself at: http://www.thelighthouseoflapeer.org. It just butchers my design. Any thoughts or fixes to this issue?

    Recently, the Yahoo Toolbar and the Babylon extension have been reported to cause that problem. They seem to overlap invisibly over the top of the web page display. If you have either or both, uninstall or disable them/it, or see if an update is available that solves the problem.
    *See --> http://support.mozilla.com/en-US/kb/Uninstalling+add-ons
    *See --> http://support.mozilla.com/en-US/kb/Cannot%20uninstall%20an%20add-on
    *See --> http://kb.mozillazine.org/Uninstalling_toolbars
    '''If this reply solves your problem, please click "Solved It" next to this reply when <u>signed-in</u> to the forum.'''
    Not related to your question, but...
    You may need to update some plug-ins. Check your plug-ins and update as necessary:
    *Plug-in check --> http://www.mozilla.org/en-US/plugincheck/
    *'''''Adobe Shockwave for Director Netscape plug-in''''': [https://support.mozilla.org/en-US/kb/Using%20the%20Shockwave%20plugin%20with%20Firefox#w_installing-shockwave Installing ('''''or Updating''''') the Shockwave plugin with Firefox]
    *'''''Adobe PDF Plug-In For Firefox and Netscape''''': [https://support.mozilla.org/en-US/kb/Using%20the%20Adobe%20Reader%20plugin%20with%20Firefox#w_installing-and-updating-adobe-reader Installing/Updating Adobe Reader in Firefox]
    *'''''Shockwave Flash''''' (Adobe Flash or Flash): [https://support.mozilla.org/en-US/kb/Managing%20the%20Flash%20plugin#w_updating-flash Updating Flash in Firefox]
    *Next Generation Java Plug-in for Mozilla browsers: [https://support.mozilla.org/en-US/kb/Using%20the%20Java%20plugin%20with%20Firefox#w_installing-or-updating-java Installing or Updating Java in Firefox]

  • Is thier  a reason haveing a for loop in paint would cause a problem

    when i have a gui

    Yes i whittled this down to make it more readable.
    I am at a loss as to what the problem is,
    running it illustrates the problem.
    import java.applet.*;
    import java.awt.*;
    import javax.swing.*;
    public class thebug extends Applet {
    Image osImg;                     // offscreen image
    Graphics osG ;                    // off screen graphics
    boolean startOut = true;      // first time painting
    Dimension curD ;                 // current size of offscreen stuff
    int c = 0;int v = 0; int vv = 0;
    int degreesZ = 1;int degreesX = 1;int degreesY = 1;
    int off_set = 150 ;
    int Xa = 1; int Ya = 1; int Za = 1;
    int Xb = 1;int Yb = 1;int Zb = 1;
    int Xp =50;int Yp = -50;int Zp =1;
                          public void init() { }       
                          public void update (Graphics g) { paint(g);  }
         public void paint(Graphics g) { //---------------------------------------------------------------------   
         for(degreesZ = 1;degreesZ <=360;degreesZ++){  //test loop  this is z rotation instep 
                     if (startOut == true){  // is this the first time painting
                     curD = getSize();
                     osImg = createImage (curD.width ,curD.height);
                     osG = osImg.getGraphics();
                     startOut = false ;
                     // has the component been resized
                     if ((curD.width !=getSize().width) || (curD.height !=getSize().height)){
                     curD =getSize();
                     osImg = createImage (curD.width,curD.height);
                     osG = osImg.getGraphics();
                              osG.setColor(Color.red);
                              osG.fillRect(0,0,300,300);      
                               c++;  // this is just for the color can be removed
                               switch(c){
                               case 1: osG.setColor(Color.black);break;
                               case 2: osG.setColor(Color.blue);c=0;break;   
                               default :{c=0;}  
                               }     // end switch/case
        //setup to rotate the point    
        Xa=Xp;Ya=Yp;Za=Zp;                              
        double radiansZ =  ( Math.PI * degreesZ )/180;
        double radiansX = ( Math.PI * degreesX )/180;
        double radiansY = ( Math.PI * degreesY )/180;                  
        //   rotate on the  axises z,x,y
        Xb = (int)(Xa * Math.cos(radiansZ) - Ya * Math.sin(radiansZ) );
        Yb = (int)(Ya * Math.cos(radiansZ) + Xa * Math.sin(radiansZ) );          
        Yb = (int)(Yb * Math.cos(radiansX) - Za * Math.sin(radiansX) );
        Zb = (int)(Yb * Math.sin(radiansX) + Za * Math.cos(radiansX) );   
        Zb = (int)(Zb * Math.cos(radiansY) - Xb * Math.sin(radiansY) );
        Xb = (int)(Zb * Math.sin(radiansY) + Xb * Math.cos(radiansY) );
        // add a screen offset
        Xb = Xb+off_set;
        Yb = Yb+off_set;
        Zb = Zb;
                      osG.drawLine(off_set,off_set,Xb,Yb);   //draw it
                      g.drawImage(osImg,0,0,this );  
        System.out.println( "end degree loop" );
        } // end degree loop      
                 osG.dispose(); 
        System.out.println( "####end paint####" );
        } // end paint ------------------------------------------------------------------------------------------  

  • T43 Vertical Scrolling Problem (not just Firefox)- Any official response from Lenovo

    After searching the forum, i have not been able to find any response from Lenovo as to how to correct this problem.
    Incidentally, my "occasional" vertical scrolling problem occurs in any browser,  IE7, Firefox3, Opera9 (at least those 3) as well as Windows applications with a vertical scroll bar like Windows Explorer.
    This only started to occur very randomly around 6 months ago.  But as of late it is occuring more often.
    The only work-around
    http://blog.jonschneider.com/2008/03/workaround-th​inkpad-gets-into-always.html 
    might indicate that it is a possible hardware problem.
    However, I have to say that I rarely use the laptop scrolling buttons and 99.9% of the time, latetly, I use a Logitech laser USB mouse for scrolling purposes. 
    As another possible work-around (if you are using an external mouse) is to uncheck the enable virtual scrolling in the touchpad properties window. 
    I certainly hope it is not a hardware problem, as the warranty on my T43 ran out a long time ago.
    btw, I am running Windows XP Pro XP3.
    Moderator Note; added system type to subject
    Message Edited by andyP on 07-27-2009 09:32 PM

    Reset the page zoom on pages that cause problems: <b>View > Zoom > Reset</b> (Ctrl+0 (zero); Cmd+0 on Mac)
    See [[Text Zoom]] and [[Page Zoom]] and http://kb.mozillazine.org/Zoom_text_of_web_pages

  • Problem downloading applet in W2K with SP4.

    Hi,
    We are using a Security Applet in our web application for validation purposes. We were using W2K Professional / W2K Server with SP3 and Sun JRE 1.3.x. The application was working as expected.
    We are now testing with W2K Server with SP4 (to upgrade to SP4). The current testing environment is W2K Server with SP4 and Sun JRE1.3.x. Now with the setup, we are facing a problem in downloading the applet (Security Applet). The downloading applet fails and the subsequent loading as well.
    Please advice. Does it requires any particular settings to be done at Client?
    The specs are
    Windows 2000 Server, SP4
    IE 6 SP1
    Sun Jre 1.3.x
    Problem:Downloading applet fails.
    PS: When we test with SP3, we can see the applet downloaded (CAB File), with SP4 it was not found.
    Thanks in Advance,
    Prakash

    Does the w2k sp4 server host your pages and applet?
    If yes then why install the SUN JRE 1.3 on the server, doesn't the client need this?
    Is the cab format supported by SUN jre or is it meant for msjvm and if so why is the client trying to open
    the cab with sun jre?
    http://java.sun.com/j2se/1.4.2/docs/guide/deployment/deployment-guide/upgrade-guide/article-02.html
    What's on the server doesn't have anything to do with the applet. The server is
    just serving it. Forcing the client/consumer of the html page with the applet is trying to open an applet
    with sun jre while the applet is ment for msjvm causes the error.
    The client can fix this by opening IE and check under tools -> internet options -> advanced -> UNCHECK
    the use sun jre ... for <applet tag. For the XP machine you might have a problem. Some of the don't have
    the msjvm at all so there is nothing to run the <applet, I tried to download it at microsoft but was unable
    to find it.

  • HT6162 IOS 7.1 creates scrolling problem?

    Upgraded my UK iPhone 5S 64GB to ios 7.1 yesterday. I have been facing page scrolling problems in all applications (Bloomberg, BBC, Safari, FT, LinkedIn, FaceBook...all applications). The problem is easily reproduced by keeping your finger on the screen when the page to scroll is displayed and moving the finger slowly to scroll the page. The page jumps in direction opposite to the expected.

    Hey, I have an iPhone 5 64Gb just updated to iOS 7.1 (11D167) . Various apps all have the same scroll problem. It's amost like 1.5 cm from the the bottom of my screen, an invisable line across the phone where swiping across up or down causes the the normal smooth motion to be jumpy. This has only just happened after the latest iOS update. I have also noticed touch senstivity issues when using the keyboard in some older apps causing key strokes to be missed or even double pressed when only pressing once, and number keys to not work also. My current work around is to type the txt or numbers into notes app, then cut or copy the txt or numbers into the app i'm  using. My other work around for the scroll issue, is to use asistive touch and create a scroll gesture.
    Hope there is a fix for this soon. I'm not totally convinced this is a hardware issue. it's too coincidental these issues just happend to occur after the latest update. Gone through the normal power cycle, soft reboot holding home button and power button for 10 secs, but makes no difference.
    I've turned back on the' automatically send' diagnostics & usage setting in general settings hoping this will contribute to a fix.

  • Problem with applet since Java 6u3

    Hi all,
    I have an applet that gets images continuously from a server by means of Toolkit.getImage(url) method. Since I have upgraded Java to version 6u3 in the machines where I use the browser, the first time the applet requests that method (Toolkit.getImage(url)) there is a delay in this method execution. I have tried to downgrade again to version 6u2 and that delay disappeared. With versions 6u5 and 6u10 (beta) the problem remains the same.
    I have seen server logs, and there is a delay between applet method execution and server (servlet) request reception.
    Another strange thing here is that I have also checked with a different server (this server is connected to Internet through a different router) and the problem doesn�t appear (there is not delay the first time the applet try to get an image). Obviously there is something to check into these servers and routers, but it's also clear that there is something in this new release 6u3 that causes the problem. I have read 6u3 release notes, and there is a bug related to applets and proxies, but I don't see relation with my problem.
    Does anyone have heared or readed anything about this?
    Thanks a lot

    You either don't have the version you thought you had or it is not associated to the Regitry key. Just download it and it should not appear the next time.

  • Java Swing apps cause Windows 2K to hang

    I have an IBM clone machine running a P4 and Windows 2k that hangs whenever I try to exit out of a window in a Java swing app. Whether the window is the main application window or a menu window instantiated by the application to be a child of the main window, does not matter. It hangs regardless. I have tried multithreaded apps and they do not cause my windows machine to hang. Neither do simple swing apps. But any multithreaded swing app causes it to hang. JEdit causes it. Forte causes it. I am running Java 1.4.1. Thanks for any help in this.

    Freezes under Java 1.4.1 with Windows
    Posted on Dec 14, 2002 - 02:57 PM by slava
    Installation This is turning into a FAQ, so I thought I'd post it on the community site. A lot of people have complained that jEdit can hard freeze their windows system after upgrading to Java 1.4.1. If you experience this, the problem is not with jEdit, but with your video driver. Updating the driver to the latest version should solve the problem; downgrading to Java 1.4.0 might also work.
    http://community.jedit.org/modules.php?op=modload&name=news&file=article&sid=190&mode=thread&order=0&thold=0

  • Firefox 6.0.1 causes extreme problems with ATI Catalyst 10.x drivers on a Win7 x64 system. When I roll back to Firefox 6.0, no problems. Can this be resolved?

    Firefox 6.0.1 causes extreme problems with ATI Catalyst 10.x drivers on a Win7 x64 system. Took me quite awhile to identify, but when I roll back to Firefox 6.0, no problems. Once Firefox recognizes this and reinstalls the 6.0.1 update then severe display driver problems occur causing very erratic display behavior and ultimately rendering the system inoperative. The problem appears to occur within a minute or two after Firefox has been opened and it occurs even if Firefox has been subsequently closed prior to the actual event taking place. I have attempted this 6 times just to ensure that the problem was associated with the 6.0.1 update.

    On Mac OS, plugins are installed to a common location, usually ''' /Library/Internet Plugins''' for system-wide availability or to '''~/Library/Internet Plugins''' for a specific user. Ref: http://kb.mozillazine.org/Issues_related_to_plugins#Background
    Does Java 1.6.0_31 work on Safari or another browser?
    I also found the following, in case it helps:
    *http://reviews.cnet.com/8301-13727_7-57414869-263/how-to-use-java-applets-in-os-x-after-java-2012-003-update/
    *http://stackoverflow.com/questions/6411909/how-to-downgrade-jre-jdk-on-mac-osx

  • Dual Monitor Causing System Problems?

    Hi, I'm new to this site, so I hope this is where I ask this question! My design group switched to G5/Cinema Display screen from old g4 setups mid 2005. I retained my Mitsubishi Diamond Pro 2020u monitor to use as a secondary display for pallettes, extra files, etc. It's hooked up using a dvi-vga adapter.
    My new G5 had hiccups from the start, but around March 2006 I started getting Kernel Panics almost every week, serious slow-downs, Adobe app crashes, etc. It got to the point that I was troubleshooting every week, but could never put a finger on exactly what was happening. IT archive-installed 10.4.4 after we discovered the system had been updated to 10.4.6 and we thought that would solve the problem. While that solved the issues that were relevant to 10.4.6 glitches, it didn't fix everything and little, persistent problems remained, including stalls, crashes and kernel panics. After removing suspect fonts, wallpaper, icons, updating software, repairing permissions, tossing preferences, and other troubleshooting over and over, we (I.T.) finally switched my cpu to another one in the department using data migration (just my user information, not software or other files). Still the same hiccups and even new glitches appeared (InDesign crashing on spellcheck, Photoshop not granting me access to save changes to files, etc.), including two more Kernel panics (within 5 minutes of each other) in the two weeks since we switched hardware. More troubleshooting fixed the app-specific problems, but there are still the persistent annoyances occurring.
    I again did all the troubleshooting mentioned above and finally someone mentioned that I'm the only designer in our group using a dual display set-up. Could there be validity to the non-cinema display monitor causing these problems and if so, what is the solution? I've disconnected the second monitor for now, but would love to have it back. Also, we work with a server (for instance, the kernel panics only happen when I try to place a file from the server into InDesign CS2 using the place command, so there's another avenue to go down if the monitor isn't the issue.)Thanks!
    G5 Mac OS X (10.4.4) graphic design applications
    G5 Mac OS X (10.4.4) graphic design applications
    G5   Mac OS X (10.4.4)   graphic design applications

    I only just disconnected the monitor, so it will take time to tell if that's a factor. As for the kernel panics, although it's always the same scenario (placing images from server through InDesign) they happen very randomly; it's not happening every single time I place a file. In fact, I just placed an image on the server into an ID doc I have on my desktop, no problem. So I can't say for sure that it has happened when working from my desktop or only when working on the server.
    G5 Mac OS X (10.4.4) graphic design applications

  • Firefox 5.0 is supposed to have a separaret Twitter tab, but I noticed today that that tab is missing. What is causing this problem?

    Firefox version 5.0 has a separate Twitter tab built into this web browser. However, today I have been having problems with launching the Firefox browser. An error message appears, after attempting to launch the browser, which states that the Firefox browser is already running, and that the process needs to be closed or that the computer needs to be restarted. After restarting my computer and launching the Firefox browser, I noticed that the built-in Twitter tab ( near the upper left-hand corner of the browser ) was missing. What is causing these problems?

    I'm pretty sure that Firefox version 5.0 has a built-in Twitter tab. Whatever the case may be, I downloaded Firefox version 5.0.1 this morning. I learned that if you right-click on a tab, that a menu box will appear on the screen. One of the options in that menu box is "Pin as App Tab." If I go to the http://twitter.com web site, and then right-click on the corresponding Twitter tab, and then select "Pin as App Tab," then a small Twitter tab will appear to the right of the orange-and-white "Firefox" tab ( in the upper left-hand corner of the Firefox web browser screen ). Then I can click on that Twitter tab and go directly to the http://twitter.com web site. However, when I exit the Firefox version 5.0.1 web browser, and then immediately re-launch it, the separate Twitter tab is gone. Is there any way, within Firefox version 5.0.1, that I can make the separate Twitter tab permanent after selecting "Pin as App Tab"? Thank you for your assistance regarding this matter.
    ''Edited by a moderator due to inappropriate content.''

  • I am using itunes 10 and trying to consolidate my files.  I keep getting the error "Copying files failed.  The file name was invalid or too long".  How can I indentify what file is causing this problem or resolve this issue?

    I am using itunes 10 and trying to consolidate my files.  I keep getting the error "Copying files failed.  The file name was invalid or too long".  How can I indentify what file is causing this problem or resolve this issue?

    BUMP
    Yes, I just get that message. I don't see how I could investigate this problem.
    I didn't mention that this happened when I was consolidating my library, not copying files to another computer.
    In other words, I'm using a "normal" itunes procedure, itunes won't complete it, and won't tell me exactly why or how to figure out how to fix it...
    Is there at least some easy way to tell which files were successfully copied to my itunes music folder so I can work on moving the uncopied files?
    Can anybody help me?

  • TS1627 I Can no longer synch my iPhone and iPad to Outlook using iTunes on a Win 7 Pc.  I updated to iTunes 11.1.4.62 a few days ago.  Don't know if that caused my problem. I've reset the Synch History, deleted any Notes in Outlook that don't have a subje

    I Can no longer synch my iPhone and iPad to Outlook using iTunes on a Win 7 Pc.  I updated to iTunes 11.1.4.62 a few days ago.  Don't know if that caused my problem. I've reset the Synch History, deleted any Notes in Outlook that don't have a subject. Grateful for any help.

    You might have better luck in the iTunes for Windows community. I'll ask the hosts to relocate your post.
    iTunes for Windows

  • I suddenly have this error message on FireFoxthis message pops up: "Could not initialize the application's security component. The most likely cause is problems with files in your application's profile directory. Please check that this directory has no re

    I suddenly encounter this error message from Fire Fox.
    Could not initialize the application's security component. The most likely cause is problems with files in your application's profile directory. Please check that this directory has no read/write restrictions and your hard disk is not full or close to full. It is recommended that you exit the application and fix the problem. If you continue to use this session, you might see incorrect application behaviour when accessing security features.
    I uninstalled the browser and download a new version but it does not resolve the issue.
    I know my hard disc has ample space. I do NOT know where to find the Profile directory to fix the read restriction box.
    == This happened ==
    Every time Firefox opened
    == After something about security add-on of Norton pop up by itself. ==
    == User Agent ==
    Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; MSN Optimized;US)

    This link shows things to check - https://support.mozilla.com/kb/Could+not+initialize+the+browser+security+component

Maybe you are looking for

  • External hard drive corruption

    I have a 512GB USB 3.0 SSD attached to my macbook air which stores all my media files for iTunes.  On several occassions after rebooting the machine the disk has been corrupted and the disk utility can't repair it.  So I end up having to restores the

  • "Disk cannot be read from or written to" When syncing CERTAIN songs to iPod

    So I bought my friend's iPod Touch. I've talked to her about this issue and she's never experienced anything of the sort. When I got her iPod Touch I downloaded the newest software (3.1.2). It's still currently running on 3.1.2 (as I know of no way t

  • TWO Adapter Engine (CA + IS) - How to delete one?

    Hi, In PI prod, I have an issue when PI has to send back an acknowledgment to ECC (when ECC send an idoc) (*). By looking queue log and reading SXMB_MONI trace, I identified that my problem is certainly with the link "IE -> Adapter Engine" and here's

  • D10, boot problems, a never ending fan test!

    I hate this noisy fan test!!! My dog always panics, if it is in the room! But that's not the problem. If I switch on the external mains, the fan test starts and ends after some ten seconds. If I push the switch at the front of the maschine, the fan t

  • ICloud access

    Just upgraded to IOS 8 and cannot connect to iCloud to complete setup. Is the system overloaded? Trying to connect with 3 iPads and 2 iPhones, all have the same "error connecting" message.