JScrollPane not scrolling, image only flickering

Hi, guys:
I have this problem that I used JAI to render an image on a JPanel and then put the JPanel into a JScrollPane. The strangest thing is that when I scroll, the scrollbar is moving but the image just flicker a little, for like 0.1 second it scrolls but quickly back to the original position. I feel that it has something to do with the paintComponent but I can't see what should be done. I will be very thankful if any of you can give me some suggestions!
David

Why my question is always ignored???
I solved the problem by add the JComponent which renders the image to an additional JPanel, and then set the JPanel to opaque by setOpaque(true), and then add the JPanel to the viewport of the JScrollPane.

Similar Messages

  • TS3048 scroll button does not scroll "down" only up

    Im having trouble with the scrolling button on the mouse. It will not scroll "down" only up and side to side. I tried cleaning it by turning it upside down and rolling it on a lint-free surface as suggested but still no working. Any other suggestions?

    Hello:
    The "upside down" thing is the standard fix.  Try rolling the ball (vigorously) on a microfiber cloth.
    Barry

  • JScrollPane not scrolling to the end of JTable

    Hello,
    I put a table in a scroll pane, and add the scroll pane to a panel. The problem is the scroll pane does not scroll to the end of the table, it always lets me view only the first 37 rows of the table, regardless of how many rows the table actually has. Basically, the scroll pane thinks the table has exactly the same height, no matter how many lines it has. Why is this happening?
    The code is something like
    model = new SearchResultTableModel(false, null, null);
    table = new ResultTable(model);
    scrollPane = new JScrollPane(table);
    mainBox.add(scrollPane);
    If this is important, the table is a bit more complicated, I subclass JTable, use a custom TableModel, several types of cell renderers / editors, so maybe this is why it behaves so strange. How could I tell the scroll pane the table is actually larger?
    Thank you very much, any ideas are highly appreciated,
    Regards from Romania,
    Adi

    Hi,
    fireTableDataChanged() is the easiest way to do it, but also that one, that forces JTable to rerender all visible cells, regardless the fact, that they are already displayed and would not need rerendering - if you add a row - for example row 7 - do fireTableRowsInserted(7,7); instead - so JTable will only render this single row if it is visible in the viewport. If you add a couple of rows, for example row 7 to 227, do fireTableRowsInserted(7,227); - always fire only the correct notifications accordingly to the changes you make, in order to keep the performance of JTable high.
    greetings Marsian

  • Safari 8.0 not loading images (only on Amazon)

    I have tried clearing cache and force quitting and restarting with shift but nothing seems to work.  And the weird thing is it is not all images on amazon, just images of products, such as within search mode or wishlist.

    Please read this whole message before doing anything.
    This procedure is a test, not a solution. Don’t be disappointed when you find that nothing has changed after you complete it.
    Step 1
    The purpose of this step is to determine whether the problem is localized to your user account.
    Enable guest logins* and log in as Guest. Don't use the Safari-only “Guest User” login created by “Find My Mac.”
    While logged in as Guest, you won’t have access to any of your documents or settings. Applications will behave as if you were running them for the first time. Don’t be alarmed by this behavior; it’s normal. If you need any passwords or other personal data in order to complete the test, memorize, print, or write them down before you begin.
    Test while logged in as Guest. Same problem?
    After testing, log out of the guest account and, in your own account, disable it if you wish. Any files you created in the guest account will be deleted automatically when you log out of it.
    *Note: If you’ve activated “Find My Mac” or FileVault, then you can’t enable the Guest account. The “Guest User” login created by “Find My Mac” is not the same. Create a new account in which to test, and delete it, including its home folder, after testing.
    Step 2
    The purpose of this step is to determine whether the problem is caused by third-party system modifications that load automatically at startup or login, by a peripheral device, by a font conflict, or by corruption of the file system or of certain system caches.
    Please take this step regardless of the results of Step 1.
    Disconnect all wired peripherals except those needed for the test, and remove all aftermarket expansion cards, if applicable. Start up in safe mode and log in to the account with the problem. You must hold down the shift key twice: once when you turn on the computer, and again when you log in.
    Note: If FileVault is enabled in OS X 10.9 or earlier, or if a firmware password is set, or if the startup volume is a software RAID, you can’t do this. Ask for further instructions.
    Safe mode is much slower to start up and run than normal, with limited graphics performance, and some things won’t work at all, including sound output and Wi-Fi on certain models. The next normal startup may also be somewhat slow.
    The login screen appears even if you usually log in automatically. You must know your login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin.
    Test while in safe mode. Same problem?
    After testing, restart as usual (not in safe mode) and verify that you still have the problem. Post the results of Steps 1 and 2.

  • Why the JScrollPane not scroll?

    I create a dialog,then I put a JScrollPane on the dialog,after this I put a JPanel on the JScrollPane,
    finally I put many checkbox on the JPanel.Due to having many checkboxes, I hope that JScrollPane can scroll,but it cannot scroll .how can I sove this problem?
    the following is my code:
    this.setSize(new Dimension(543, 523));
    this.getContentPane().setLayout(null);
    jButton3.setText("ok");
    jButton3.setBounds(new Rectangle(235, 455, 95, 30));
    jButton4.setText("cancel");
    jButton4.setBounds(new Rectangle(395, 455, 100, 30));
    // jScrollPane1.setBounds(new Rectangle(0, 20, 515, 1195));
    // jScrollPane1.setAutoscrolls(true);
    jPanel1.setBackground(Color.cyan);
    jPanel1.setLayout(null);
    jPanel1.setAutoscrolls(true);
    jPanel1.setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED));
    jCheckBox1.setText("attrib_manager");
    jCheckBox1.setBounds(new Rectangle(10, 10, 110, 25));
    ������������
    jCheckBox66.setBounds(new Rectangle(205, 1120, 97, 26));
    jCheckBox66.setEnabled(false);
    ������������
    jPanel1.add(jCheckBox66, null);
    jPanel1.add(jCheckBox1, null);
    JScrollPane jScrollPane1 = new JScrollPane(jPanel1);
    jScrollPane1.setBounds(new Rectangle(0, 20, 515, 425));
    jScrollPane1.setAutoscrolls(true);
    jScrollPane1.getViewport().add(jPanel1, null);
    this.getContentPane().add(jScrollPane1, null);
    this.getContentPane().add(jButton4, null);
    this.getContentPane().add(jButton3, null);

    You have to set size of your panel.
    override method getPrefferedSize() of panel. This methd should return correct size of content.
    best regadrs
    Stas

  • Yahoo.ca homepage will not show images, only red blocks, Firefox 4

    I had to reformat my hard drive because of a bad virus, and everything worked properly before that. The OS is Windows XP Pro SP3, fully updated. I updated to Firefox 4. My sympatico.ca home page is working great, but when I go to the yahoo.ca home page, there are red blocks instead of images. I dumped 4, went back 3.6 and it worked for a few days, then went back to red images. Subsequent gradual updates to 4, haven't resolved the problem. I've gone through everything I can find, in help and troubleshooting, checked page info, options, uninstalling and re-installing Firefox, with the same result. Installed the latest versions of Flash Player and Shock Wave. I'm at my wits end, and can't figure out what I'm missing. The same problem exists if I use Internet Explorer 8, which I really don't like to use. I haven't used Netscape for many years.
    This is totally frustrating, and I really need some wise help.
    Can anyone please, give me some answers and genuine direction to fix this issue.
    Thanks for your help, and have a great day
    Claude McMahon

    Hi Xircal
    Thanks for your reply. Unfortunately, I didn't see any solution to my issue. I did detail in my original question post what my OS is, and all other info about my system. I have changed nothing that was on my PC before this issue happened. I have the same PC security package, antivirus software etc, provided by Bell Canada, that I have used successfully for years, and didn't have this issue previous to having to reformat the hard drive. I did go into the ad blocker program, but the only thing I can do is change the color of the blocked image.
    I've been building my own PC's for about twenty years, and normally can fix most issues that arise. I've also been using Yahoo mail for a long time, and was always able to see the images, except for the last couple of weeks since the reformat. I can live with not seeing the images, but it's frustrating not to be able to resolve the issue.
    If you can help great, and if you need any other info, please let me know.
    Have a super day
    Claude

  • Illustrator not printing images - Only printing as white fill.

    So I've had this issue a few times and to get around it I normally just flatten the entire image in Photoshop.
    I'd like to truely solve my issue though now as it seems to come up frequently now that a certain client has been supplying me with their artwork.
    The file they send has pantones colours in it, which I than convert to cmyk including the entire document.
    They've got a few images of drinks in cliping masks. When I go to print the document the entire image comes out as a white fill as though it wasn't included in the printing process, just its path.
    The images are embeded and not vectorized. They are resolution photos of a drink.
    Any solutions?
    Thanks,
    Mike

    What kind of Apple hardware are you using? This forum is for an Old Apple productivity software package that is no longer sold. If you can help us by posting your equipment specs, we can get you moved to a more appropriate and active forum.

  • My mouse scroll button only moves up (not down)

    My scroll button on my Apple mouse (brand new iMac) was working beautifully. All of a sudden, it will not scroll down -- only up.
    Can someone give me an idea as to what might be wrong? (I checked my mouse preferences and the setting is correct, "vertical and horizontal").
    Thanks in advance.

    OK
    I have the same problem with my wireless mouse which isn't dirty, because when using it with a CAD program which uses the scroll ball as zoom in/out it works fine.
    Maybe it stopped working with the latest upgrade?.

  • Mail 7.3 (1878.6) not displaying images in random messages.

    In the last couple of weeks, I've noticed that, with no preference changes made by me, that random messages are not displaying images only empty boxes with the small blue question-mark box in the middle. This is almost exclusively from companies and organizations that I'm interested in.
    I've made no changes with regard to messages downloading with my mail in Mail's preferences. If I had, I'd think that ALL such messages would behave the same.

    Nothing happens. Loading remote content is a Mail preference for me for everything. Best I can do is choose to click the "if your having trouble seeing this..." offered by many advertisers to take you to their site.
    Since it's random, I wonder if it's not something that has to do with those specific servers sending those messages. And it's only a few, but enough to be annoying. These are people I've received perfect content from for years in some cases. No changes have been made to my preferences.

  • Photos in album are only a hash-marked outline the image only shows when scrolling how can I see the image and open the photo?

    Photos in iPhoto album are only a hash-marked outline the image only shows when scrolling how can I see the image and open the photo?

    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

  • VJO in not defined & image corrupt or truncated,only in FF & also safe mode but ok in private browsing

    VJO not defined & image corrupt or truncated
    I am getting this error when the computer renders some websites. It happens with ebay & on youtube. It shows the text but no pictures or background. I am running Windows 7 Home Premium 64bit and Firefox 4.0.1 it also happens in the newest version of FF & in safe mode , I have installed the latest Java runtime with no change ,but interstingly if I turn on "in private browsing" FF runs OK.
    I have run Firefox in safe mode, I have uninstalled completely using the APPS own uninstaller & then cleaned up all the files left behind with a 3rd party uninstaller I have updated Firefox to the newest release & rolled back to v4.0.1,I have disabled all addons & AV & malware apps (just for a minute)I have even tried a system restore. Also the "VJO not defined" only happens with FireFox & not with IE.interestingly FireFox runs fine if I enable "in private browsing"

    Clear the cache and the cookies from sites that cause problems.
    "Clear the Cache":
    * Tools > Options > Advanced > Network > Offline Storage (Cache): "Clear Now"
    "Remove Cookies" from sites causing problems:
    * Tools > Options > Privacy > Cookies: "Show Cookies"

  • Facebook images, profile photos, cover photos are not loading. Only small blue square with question mark. Same thing in Safari, FireFox, Chrome.

    Since July on MacBook Pro facebook images, profile photos, cover photos are not loading. Only small blue square with question mark. Same thing in Safari, FireFox, Chrome. Everything is up to date including last version of Adobe Flash. And watching YouTube also a problem. Video is skipping, freezing for few seconds and jumps forward. At the same time on Toshiba with Windows Vista under the same account, same wi-fi connection everything works fine.
    Please help with sugesstions to fix the issue.

    Seems like problem is solved but it might be temporarily. Anyway. Click on the image, it will open facebook photo browser. Image is not loading so right click on the blue box with question mark, save image as. It will start downloading but without any success since browser do not see the image. After this attempt refresh the page and close all tabs with facebook. Try to open facebook once again. For some reason after this weird actions all images displayed properly. Do not know for how long but now it works.

  • Background image not scrolling with text

    My foreground text will resize with my browser but the background stays stationery, remains in the upper left. How do I fix this? I have included part of my code.
    Ideally I would like to anchor text boxes to background image so it will scroll all together. If this can't be done I can use the margins and padding to adjust my text to work with the background I just need it to move with it.  I've seen samples of this, which i  think may have been done in photoshop but I would like to keep the copy live in DW. FYI, I added "background-attachment:scroll" to the code. I have searched and searched online for a solution to no avail.  I am attaching a coupld of PDFs so you can see where I want to go. Any help is greatly appreciated. Thanks a bunch in advance and please be gentle.
    body  {
         background: #666666; /* it's good practice to zero the margin and padding of the body element to account for differing browser defaults */
         padding: 0;
         text-align: center;
         background-image: url(Images/Background_Radial77.jpg);
         background-repeat: no-repeat;
         margin-right: 0%;
         margin-top: 19%;
         color: #FFF;
         background-color: #FFF;
         background-attachment:scroll
         margin-left: 0%;
         font-family: Verdana, Arial, Helvetica, sans-serif;
         font-size: 100%;
         margin-bottom: 0;
         margin-left: 0;

    My foreground text will resize with my browser but the background stays stationery, remains in the upper left. How do I fix this?
    That's how web pages work.  Remember, web design is nothing like print design.  Printed pages or graphics are static.   Web pages must be flexible to accommodate  different displays, text sizes and varying amounts of content.   Trying to precisely position text or other objects over a huge background is a bit like  trying to nail Jello to a wall.  No matter how hard you try,  it will never hold up.
    Fixed Background Example -
    http://alt-web.com/DEMOS/fixed-background.shtml
    Scrolling Divisions Example -
    http://alt-web.com/DEMOS/multi-scrollbars.shtml
    Your best option is to slice and dice your background image into usable segements in Photoshop or Fireworks.  Save images only.  Then re-assemble slices  in  DW to create flexible containers.
    Basic Tutorial - Bringing 3 image slices into a CSS layout -
    http://alt-web.com/DEMOS/Image-slices-in-a-CSS-based-layout.shtml
    Advanced Tutorial -
    Taking  a Fireworks (or Photoshop) comp to a CSS based layout in DW
    http://www.adobe.com/devnet/fireworks/articles/web_standards_layouts_pt1.html
    Good luck with your project,
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    www.alt-web.com/
    www.twitter.com/altweb
    www.alt-web.blogspot.com

  • JEditorPane not scrolling in JScrollPane no matter what

    Hello,
    I thoroughly researched this problem and I tried all suggestions, but nothing seems to work. I have a JEditorPane inside the JScrollPane, but JEditorPane does not scroll horizontally no matter what. It simply cuts off the text to the right.
    Here is my code:
    reportArea = new JEditorPane() {
    public boolean getScrollableTracksViewportWidth() {                   
    if (getSize().width < getParent().getSize().width)
         return true;
    else
         return false;
    public void setSize(Dimension d) {                   
    if (d.width < getParent().getSize().width)
         d.width = getParent().getSize().width;
    super.setSize(d);
    reportArea.setEditorKit(new HTMLEditorKit());
    reportArea.setEditable(false);
    JScrollPane reportJ = new JScrollPane(reportArea);
    reportJ.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
    reportJ.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
    Any suggestions will be greatly and truly appreciated!
    Elana

    I need to display HTML page, that's why I need JEditorPane. Also, In the html table that I'm displaying I have the nowrap attribute, so nothing gets wrapped at all. It's just being cut off...
    ;-(

  • When I email photos from my iphone, firefox will not let me open them in yahoo.mail as jpeg images, only firefox documents

    when I email photos from my iphone, firefox will not let me open them in yahoo.mail as jpeg images, only firefox documents

    Two weeks ago I posted this, but no one replied telling me how to correct the problem.
    I think Firefox engineers need to improve Firefox between now and the next up-date to make it adequate to handle all major websites. There aren't many websites used by as many people as yahoo. So why have Firefox engineers ignored this deficiency in Firefox?

Maybe you are looking for

  • How much storage do I need on a MacBook Air?

    Hi, I am about ready to convert from a PC to a 13 inch MacBook Air for work purposes. I have been a Mac user personally since the beginning. I will use this computer for email, word docs, some music and some photos. My PC says I have only used 40gb o

  • Error occured during installation of iTunes...

    During installation of iTunes i got the following message: An error occurred during the installation of assembly "Microsoft.VC80.CRT, version="8.0.50727.4053", type="win32", publicKeyToken="1fc8b3b9a1e18e3b",processor Architecture="x86". Please refer

  • Why Does My icloud Password Shorten Itself?

    So I am trying to download this app called Exaktime on my iphone which requires that you connect the app to icloud. When I enter my apple id info to login an error comes up that tells me the login info doesn't match and to verify my settings. So I ch

  • The dreaded "Cannot connect to Microsft Excel..."

    Hello everyone, First time back in a couple of years apart from the sporadic visit. I am upgrading to SAP Dashoards 4.1 and currently running the SP5 trial. After trying a couple of templates to make sure all was ok, and it seemed to work fine, I fir

  • What to do if my iPod is locked for over 23 million minutes?

    I didn't do anything to my iPod and it locked for over 23 million minutes. I can't reboot/restart/ the thing to make it like a brand new ipod. what should i do? Its a iPod 2nd Generation.