JScrollPane- Scrolling makes the contents of the Pane garbled

I have a JTextPane inserted into a JScrollPane and the JSrcollPane is Inserted into the bottom part of the JSplitPane..
  private JTextPane ResultTextPane = new JTextPane();
  ResultScrollPane.getViewport().add(ResultTextPane, BorderLayout.CENTER)
  ResultSplitPane.add(ResultScrollPane, JSplitPane.BOTTOM);Now, When i try scrolling the scrollpane, the text is garbled. (A part of text seems be to dragged when the scroll bar is moved..).If i resize the window, the text is displayed fine and if I start scrolling, the text gets garbled again..
I am not sure what the problem is? Am I suppose to use a scrollinglistener(AdjustChangeListener) and repaint the contents of the textpane or is it suppose to be happen automatically.

The easiest way to use a JScrollPane is:
JScrollPane scrollPane = new JScrollPane( textPane );
If you need to reset the component in the scrollPane then you would use:
scrollPane.getViewport().setView( textPane );
Dont use the add(..) method of the viewport.

Similar Messages

  • JScrollPane - scrolling to the top

    Hello,
    I have packed JTextArea in JScrollPane. Now when I append long text to JTextArea, it shows the bottom line of the text.
    How to programatically scroll to the top of text area after text update?
    Roberts

    try with "textArea.setCaretPosition(0);"
    Greetings,
    Marco

  • I have updated to the latest version however I am still experiening blackouts on all or portions of pages. Scrolling makes the problem worse.

    I am experiencing blackouts on all pages. It can occur in blocks or be the whole page. It appears when running my cursor over the page or when scrolling. Scrolling again or leaving and then returning to the page sometimes helps. I have updated to the latest version and I have unchecked the hardware acceleration feature, however the problem remains.

    Hello,
    The latest version is 33.1 - since user agents will only show 33.0 for us, can you confirm that you have 33.1 for me by going to:
    * Help (or [[Image: New Fx Menu]] > [[Image: Help-29]]) > About Firefox
    Thanks!
    Have you also tried Firefox Safe Mode to see if the problem goes away? [[Troubleshoot Firefox issues using Safe Mode|Firefox Safe Mode]] is a troubleshooting mode that turns off some settings, disables most add-ons (extensions and themes).
    If Firefox is open, you can restart in Firefox Safe Mode from the Help menu:
    *Click the menu button [[Image:New Fx Menu]], click Help [[Image:Help-29]] and select ''Restart with Add-ons Disabled''.
    If Firefox is not running, you can start Firefox in Safe Mode as follows:
    * On Windows: Hold the '''Shift''' key when you open the Firefox desktop or Start menu shortcut.
    When the Firefox Safe Mode window appears, select "Start in Safe Mode".<br>
    [[Image:Safe Mode Fx 15 - Win]]
    '''''If the issue is not present in Firefox Safe Mode''''', your problem is probably caused by an extension, and you need to figure out which one. Please follow the [[Troubleshoot extensions, themes and hardware acceleration issues to solve common Firefox problems]] article to find the cause.
    ''To exit Firefox Safe Mode, just close Firefox and wait a few seconds before opening Firefox for normal use again.''
    When you figure out what's causing your issues, please let us know. It might help others with the same problem.

  • Where is the Pan Image filter

    I need to use the Pan Image Effect on a great set of still images and can't find the Pan Image filter. I should have been able to find it under video transforms folder on the Effects Palette.

    I was able to make the pan effect work. It is really poor when compared to stage tools.
    1) the image pixelation is rediculous
    2) the finished result is worse than  rediculous
    3) I took the stage tools and did a horizontal pan at the bottom of the image that would be equalent to about isa small strip along the botton 8000x6200 image at about a scale of600 during the entire process the entire full resolution image was on screen and the little frame moved across the image and the pop up monitor that was provided by stage tools showed the actual path of the frame across that full size image (30" monitor) so you not only saw it in high resolution but it was extremely easy to track especially when following a non irregular line down a winding canyon or river.
    the reason that the stage tools client list reads like the who's who's of motion picture industry is because it's about 100 times better than using the motion effect built into Adobe.
    http://www.videofame.com/VideoProductions/Client_List_Broadcast.mht
    did you really think that Lucas Films would have been one of the largest users of this plugin if Adobe had the panning capability this does.
    You guys are like trying to think that anything you can't do Adobe directly is silly. Give it a break. I love Adobe I own I think the fact that they encourage outside vendors to create great plugins for Adobe users is brilliant. some how I think you guys have missed the point. Adobe can't even compare with stage tools for panning and zooming. like a difference between a VW bug and a F1 Ferrari it's just rediculous. But don't take my word for it download the stage tools for free like I did and try it. You just won't believe the difference. You need to start with a super quality image though from the Hasselblad website downloads area you should be able to download some 50 or 60 MB files that are like the dimensions shown below:
    http://www.hasselbladusa.com/products/h-system/h4d-60.aspx
    Sensor size: Dalsa 60.1 Mpixels (8956 x 6708 pixels)
    Sensor dimensions: 40.2 mm x 53.7 mm
    Image size: RAW 3FR capture 80 MB on average. TIFF 8 bit: 180 MB
    Where talking Lucas film quality now not 35mm Rebel or D30's

  • 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

  • Changing the pane content in a swing frame

    hi
    I am now trying to implement a GUI, which consist of a JSplitPane including two JScrollPane-s. The left scroll pane is a JTree and the right should display a sequence of JLabels and JTextFields, depending on the selected tree node on the left.
    I can't figure out how I can change the content of the right scroll pane with each new selection in the tree.
    Here is a part of my code, it seems straightforward, but it displays an EMPTY right JScrollPane.
    Do you have any idea why it is empty?
    NOTE: maskViewPane is my right JScrollPane, which does not display anything!!!
    public void valueChanged(TreeSelectionEvent e) {
            Node node = (Node)tree.getLastSelectedPathComponent();
            if (node == null) return;
            JPanel pane = new JPanel(new GridBagLayout());
                  for(int i = 0; i < labelsVALUES.size(); i++) {
                       JLabel labelComponentI = new JLabel(labelsVALUES.get(i));
                       labels.add(labelComponentI);
                       c.insets = new Insets(15, 15, 0, 30);
                       pane.add(labelComponentI, c);
                       JTextField tfComponentI = new JTextField(TextFieldsVALUES.get(i));
                       textFields.add(tfComponentI);
                       c.insets = new Insets(0, 15, 0, 30);
                       pane.add(tfComponentI, c);
             maskViewPane.removeAll();  //NOTE: maskViewPane is my right JScrollPane, which doesn't display anything
             maskViewPane.setViewportView(pane);
             maskViewPane.repaint();
             this.repaint();
        }

    Let me introduce to to this wonderful place:
    http://forum.java.sun.com/forum.jspa?forumID=57
    :)

  • Acrobat Pro 9.0 freezes when viewing/scrolling through the table of contents of a document

    I am hoping someone can help me or has experienced the same problem I'm about to describe. I belong to the technical publications group of a fairly large company and I review a lot of PDF documents. I just installed Acrobat 9.0.0 (via CS4 Design Standard) and I've noticed on larger documents where there's a full page or several pages worth of Table of Contents, Acrobat 9.0.0 seems to freeze up when I begin scrolling through the TOC. For example, if I want to use the Text Edit tools or use a sticky note, when I press on an icon, Acrobat will freeze for a good 10 seconds, then will allow you to press the icon. It tends to freeze each time I want to make my next edit or even pressing the up/down arrow buttons to go to the next page. Once I get through the TOC pages, Acrobat seems to function normally--no freezes.
    Has anyone experienced this? Would appreciate any kind of advice on how to fix--perhaps there's a patch or update?
    I didn't experience any of this using Acrobat 8.0--I never had any real problems with Acrobat until 9.0.0.

    Your issue may not be related to a difference between v8 and 9.
    I have not had this problem on my computers, but a coworker had this issue. For many documents that others were able to open and scroll through without issue, his computer was freezing and unfreezing.  IT determined his graphics capabilities were not able to keep up with the requirements of working with larger documents and gave his computer a RAM upgrade and a new graphics card. Particularly during scrolling, higher demands are made on the computer to graphically render and re-render page content. Documents giving him problems before became a non-issue.
    A new graphics card is obviously a $$$ solution, but you might want to check to see if your RAM meets the minimum requirements and check to see if there are any program updates (Help > Check for Updates).
    I have had an issue of pdfs freezing, but not specifically in the table of contents areas. If your document has pages with images that have an unusually high number of layers, it may affect the ability to work effectively in the document.

  • When I load Safari on my IPAD2, the web page comes up, but I can't scroll down the page. No matter what web page I go to the content stays darker than the navigation bar. This just started today. All other applications work fine.

    When I bring up Safari on my IPAD2, the web page comes up, but I can't scroll down the page. This just started today. No matter what web site I go to, the content is darker than the navigation pane.

    If it's happening on all sites, then assuming that it's Safari that you're using, have you tried clearing it's cache : Settings > Safari > Clear Cache (other browsers should have similar options, possibly within the actual app instead of within Settings). You could also try closing the app completely : from the home screen double-click the home button to bring up the taskbar, then press and hold any of the apps on the taskbar for a couple of seconds or so until they start shaking, then press the '-' in the top left of the Safari app (or whichever browser you're using) to close it, and touch any part of the screen above the taskbar so as to stop the shaking and close the taskbar.
    If that doesn't work then you could try a reset : press and hold both the sleep and home buttons for about 10 to 15 seconds (ignore the red slider), after which the Apple logo should appear - you won't lose any content, it's the iPad equivalent of a reboot.
    If it's only happening on a particular site then there may be content on that site that isn't supported on the iPad e.g. flash, java, silverlight

  • I imported a video I make in another program and I played it back in the video editor and I like the pan and zoom that was added by the program how do I save a copy with the effect of Premiere elements 12

    I imported a video I make in movie maker program and I played it back in the premiere video editor and I like the pan and zoom that was added by the program how do I save a copy with the effect of Premiere elements 12
    all I did was played it back how do I save that and make a new version of the video beacause when I save a copy the effect look I was trying to save was not there.
    Rodney
    [personal information removed... Mod - https://forums.adobe.com/docs/DOC-3731]
    [This is an open forum, not Adobe support, please do not post personal information]
    [If you are posting using email, please turn your 'sig file' function OFF for posting]

    silkman1
    I would be glad for the opportunity to customize a Premiere Elements 12 answer to your Premiere Elements 12 issue.
    But, I want to make sure that we are together on the details. This is my understanding of what you have written. Please review and let me
    know if I am misinterpreting anything that you have written.
    You have a video created in Windows Movie Maker.
    How did you output the video from Windows Movie Maker...wmv or mp4, what was the frame size and frame rate of that export?
    Next you import that video into Premiere Elements 12 (can we assume that this is on Windows 7, 8, or 8.1 64 bit?)
    From what you wrote, you have applied a pan and zoom effect to your video in Premiere Elements.
    Now you go to export the Premiere Elements 12 Timeline content with your video with the pan and zoom applied.
    But, the pan and zoom effect is not seen in playback of the export.
    Is all of the above correct so far?
    If so....we are going to need some more details from you...
    a. What is the project preset that you or the project are setting to match the properties of the video coming from Movie maker? See Edit Menu/Project Settings/General and the readings for Editing Mode, Timebase, Frame Rate, and Pixel Aspect Ratio even if the fields look grayed out.
    b. Are you applying the pan and zoom effect with the Pan and Zoom Tool, fx Effects Presets, or keyframing the Scale (for Zoom) and
    Position (for Pan) in the Motion Panel expanded?
    c. What are you selecting as your export in Publish+Share/. Please give details...are you using default settings or customizing the export
    setting under the Advanced Button/Video Tab and Audio Tab of the preset selected?
    I am suspecting some sort of mismatch of your project settings or some problems with working with the Pan and Zoom tool. I need
    your answers to help me help you. If I have written anything that you do not understand, please let me know. I will re-write if necessary
    so that we are in sync to resolve the issue.
    Thanks.
    ATR

  • How to make the knob of a horizontal Scroll Bar stay at right

    Hi I need some advise to achieve this:
    I have a chart continuously deploying towards the right side (think on an electro cardiogram that is continuously feeding data). All the chart information is kept available inside a JScrollPane. What I want to achieve is:
    1. if the horizontal scroll bar knob is at the right end of the scroll bar make the end part of the chart be displayed continuously (view is scrolling to the right, the knob stays at the right end)
    2. if the user moves the knob left from the right end freeze the motion and just show the selected portion (meanwhile data keeps being fed and stored but not displayed)
    3. when the user decides to drag the knob again to the right end the behavior of point # 1 resumes.
    The basic swing structure I'm using for this is the following:
    public class Electro extends JPanel {
    public Electro() {
    JFrame f = new JFrame();
    JScrollPane sp = new JScrollPane(this);
    f.getContentPane().add(sp);
         f.pack();
         f.setVisible(true);
    I would highly appreciate any feedback from fellow members. Thank you.

    hi friend
    try this in ur code
    public class Electro extends JPanel {
    public Electro() {
    JFrame f = new JFrame();
    JScrollPane sp = new JScrollPane(this);
    sp.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
    sp.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);
    f.getContentPane().add(sp);
    f.pack();
    f.setVisible(true);
    i think it will be help full to you
    thanks
    waiting for reply

  • Make the height of a tabbed panel content container adjust to the individual tab's content.

    I am designing a site and on one page I am using two tabs to seperate two different kinds of content.  One tab has more content and as such is longer on the page. But I noticed that MUSE uses which ever tab is the longest as the basis for how long the page is. This is fine while on that tab, but on the other tab it makes the page much longer (bunch of dead space) then it needs to be.  Is there a way of getting around this or is this a limitation of muse?
    Take a look at the page here and you will see what I mean. Click on cuff cases and scroll down and you will see what I mean.
    http://pgl0.businesscatalyst.com/accessories---prince-gun-leather.html

    Hi Lukewind,
    This has come up in the forum archive. There is not currently a way to create a tabbed panel with adjustable/variable height content containers. This is not actually a bug in Muse, but it is a feature request. Please create an Idea topic for this feature in the Ideas for Features in Adobe Muse forum (http://forums.adobe.com/community/muse/ideas).
    Here is the content from the archive request:
    Have the depth of tabbed panels adjust to the size of the content.
    The boxes in tabbed panels should be adjustable to the content rather than have all the tabs open in the same size as the biggest text box.

  • How make the Top-level Navigation and Content Area in one page as a whole?

    I want to make the Top-level Navigation and the Content Area in the one page as a whole displayed in user interface.In the default framework,the Top-level Navigation and the Content Area were contained  in 2 pages, So the vertical scroll bar could only control the Content Area. I want to control the full page with  one vertical bar like the page of "www.sdn.sap.com" Web.

    Hi Jianguo,
    One advantage of the external facing portal solution (SP14) is that the framework page is displayed in a single frame. Perhaps this could be of use to you.
    Hope this helps.
    Daniel

  • How do I make the header, content, and footer transparent in Dreamweaver CS6?

    I try setting background color to transparent but it just turns white instead. I want to be able to just see my background image and color and have all content "floating" on my web page.
    Also on backgrounds, what is the coding for making sure the background is contained within whatever monitor size it is viewed within or will it automatically scale up/down?
    Thanks,
    Jennifer

    I'm just using a basic Dreamweaver page that has some CSS already in the head (haven't done much work on it yet, just trying to get those things transparent first):
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <!-- TemplateBeginEditable name="doctitle" -->
    <title></title>
    <!-- TemplateEndEditable -->
    <!-- TemplateBeginEditable name="head" -->
    <!-- TemplateEndEditable -->
    <style type="text/css">
    <!--
    body {
        font: 100%/1.4 Verdana, Arial, Helvetica, sans-serif;
        background-image: url(../images/helia_bg.jpg);
        background-position: top;
        background-repeat: no-repeat;
        background-color: #fff0c1;
        margin-bottom: 200px;
        margin: 0;
        padding: 0;
        color: #000;
    /* ~~ Element/tag selectors ~~ */
    ul, ol, dl { /* Due to variations between browsers, it's best practices to zero padding and margin on lists. For consistency, you can either specify the amounts you want here, or on the list items (LI, DT, DD) they contain. Remember that what you do here will cascade to the .nav list unless you write a more specific selector. */
        padding: 0;
        margin: 0;
    h1, h2, h3, h4, h5, h6, p {
        margin-top: 0;     /* removing the top margin gets around an issue where margins can escape from their containing div. The remaining bottom margin will hold it away from any elements that follow. */
        padding-right: 15px;
        padding-left: 15px; /* adding the padding to the sides of the elements within the divs, instead of the divs themselves, gets rid of any box model math. A nested div with side padding can also be used as an alternate method. */
    a img { /* this selector removes the default blue border displayed in some browsers around an image when it is surrounded by a link */
        border: none;
    /* ~~ Styling for your site's links must remain in this order - including the group of selectors that create the hover effect. ~~ */
    a:link {
        color: #42413C;
        text-decoration: underline; /* unless you style your links to look extremely unique, it's best to provide underlines for quick visual identification */
    a:visited {
        color: #6E6C64;
        text-decoration: underline;
    a:hover, a:active, a:focus { /* this group of selectors will give a keyboard navigator the same hover experience as the person using a mouse. */
        text-decoration: none;
    /* ~~ this fixed width container surrounds the other divs ~~ */
    .container {
        width: 960px;
        background-color: #FFF;
        margin: 0 auto; /* the auto value on the sides, coupled with the width, centers the layout */
    /* ~~ the header is not given a width. It will extend the full width of your layout. It contains an image placeholder that should be replaced with your own linked logo ~~ */
    .header {
        background-color: #ADB96E;
    /* ~~ This is the layout information. ~~
    1) Padding is only placed on the top and/or bottom of the div. The elements within this div have padding on their sides. This saves you from any "box model math". Keep in mind, if you add any side padding or border to the div itself, it will be added to the width you define to create the *total* width. You may also choose to remove the padding on the element in the div and place a second div within it with no width and the padding necessary for your design.
    .content {
        padding: 10px 0;
    /* ~~ The footer ~~ */
    .footer {
        padding: 10px 0;
        background-color: transparent;
        font-size: x-small;
        text-align: center;
    /* ~~ miscellaneous float/clear classes ~~ */
    .fltrt {  /* this class can be used to float an element right in your page. The floated element must precede the element it should be next to on the page. */
        float: right;
        margin-left: 8px;
    .fltlft { /* this class can be used to float an element left in your page. The floated element must precede the element it should be next to on the page. */
        float: left;
        margin-right: 8px;
    .clearfloat { /* this class can be placed on a <br /> or empty div as the final element following the last floated div (within the #container) if the #footer is removed or taken out of the #container */
        clear:both;
        height:0;
        font-size: 1px;
        line-height: 0px;
    -->
    </style></head>
    <body>
    <div class="container">
      <div class="header"><a href="#"><img src="" alt="Insert Logo Here" name="Insert_logo" width="180" height="90" id="Insert_logo" style="background-color: #C6D580; display:block;" /></a>
        <!-- end .header --></div>
      <div class="content">
        <h1>Instructions</h1>
        <p>Be aware that the CSS for these layouts is heavily commented. If you do most of your work in Design view, have a peek at the code to get tips on working with the CSS for the fixed layouts. You can remove these comments before you launch your site. To learn more about the techniques used in these CSS Layouts, read this article at Adobe's Developer Center - <a href="http://www.adobe.com/go/adc_css_layouts">http://www.adobe.com/go/adc_css_layouts</a>.</p>
        <h2>Layout</h2>
        <p>Since this is a one-column layout, the .content is not floated. </p>
        <h3>Logo Replacement</h3>
        <p>An image placeholder was used in this layout in the .header where you'll likely want to place  a logo. It is recommended that you remove the placeholder and replace it with your own linked logo. </p>
        <p> Be aware that if you use the Property inspector to navigate to your logo image using the SRC field (instead of removing and replacing the placeholder), you should remove the inline background and display properties. These inline styles are only used to make the logo placeholder show up in browsers for demonstration purposes. </p>
        <p>To remove the inline styles, make sure your CSS Styles panel is set to Current. Select the image, and in the Properties pane of the CSS Styles panel, right click and delete the display and background properties. (Of course, you can always go directly into the code and delete the inline styles from the image or placeholder there.)</p>
      <!-- end .content --></div>
      <div class="footer">
        <p>© Moving Harmonies - Site Design by <a href="....">JRH Creative</a></p>
        <!-- end .footer --></div>
      <!-- end .container --></div>
    </body>
    </html>

  • How to make the scrollbar function with mouse scroll wheel?

    Is there a way how to make my content scroll even with the mouse scroll wheel?... I have to edit the coding??

    Hey!
    You shouldn't have to edit any code.
    There is an active player bug surrounding this issue however, which causes the following:
    1) It should work on windows.
    2) It may not work on Mac.
    We're continuing to pursue this issue, we know it's important to our users.
    Thanks,
    Tara

  • Edu DVD in computer iTunes but does not show up in iPad iTunes or iPad video.  How do I make the DVD contents available on the iPad?

    Educational DVD added successfully to computer iTunes but does not show up in iPad iTunes or iPad video.  How do I make the DVD contents available on the iPad?

    Thanks!  For whatever bizarre reason for which I have no answer - I sync'd my iPad to my MBP the old fashion way (not iCloud) and the movie showed up just fine.  It is Nikon camera 'how to' video. I like to watch them for a better indepth discovery of what the camera can do.  The only weird thing about the hard wire sync is that it was placed in a catagory "home movies" which was never there before...actually it showed up in two places "home movies" and TV shows.
    So, thanks anyway!  Pretty cat!
    Mona

Maybe you are looking for