JEditorPane - Don't scroll on setText()

Hi,
Can someone help me with my problem?
I have a JEditorPane, and i update it 2 times pro second with setText(), but i don't want that it scroll's to the top of de JEditorPane. It must stay were it is.
Sorry for my bad English

camickr wrote:
and the new text is "abcdefghijk", so only hijk are added. Use a JTextArea, then you can use:
textArea.append( "hijk" );instead of using setText(...);Thanks, it works :)

Similar Messages

  • Since I installed IOS 8.0.2 (was ok on IOS7),on my iPad 4 "photos" don't scroll properly, it freezes and staggers, it's really slow to scroll to the bottom of the page (in Album, Events From My IMac) it's very annoying!

    Since I installed IOS 8.0.2 (was ok on IOS7),on my iPad 4 "photos" don't scroll properly, it freezes and staggers, it's really slow to scroll to the bottom of the page (in Album, Events From My IMac) it's very annoying!

    I'm not sure, but I know it's not recommended to upgrade to iOS 8 on anything older than an iPhone 5. I only lost my music playlists and music that was on my phone, but that music is also on my iTunes, not the playlists though, and I don't want to go through ALL my iTunes library to fix it either... But it seems I don't have a choice right now.
    Whatever you do, do NOT upgrade to iCloud Drive, keep iCloud till OS X Yosemite comes out, if your computer is a Mac. I also just noticed that all my documents on my phone are gone from Pages, BUT if I go on the iCloud website they are still there. Hopefully it will all work itself out when I can update my macbook pro to OS X Yosemite.
    If you backed up your phone and all your purchases off your iPhone prior to trying to upgrade you should be fine... But I'm not even remotely sure.

  • Titles don't scroll across screen anymore

    On my new 30 GB iPod, the song titles scrolled across screen during playback but after I did a restore they now only appear static and are truncated if to long for the display screen. I rstored because I mistakenly thought there was a problem with the iPod when I tried to use it attached to my work computer - firewall issues. I can't find a configuration to enable that "feature"...

    I'd like to see this change as well.. I sent in a request through the iPhone feedback form.
    I understand the difficulty in trying to implement this though.. since track selection is a one step process on the iPhone (tap) versus a two step process on the iPod (wheel-select then exectute), you'd have to have all the long titles scrolling at the same time, which would look rather chaotic.
    Maybe it could be done on the iPhone by having the title scroll if you tap-hold on the title.

  • Arrows /home/end keys don't scroll

    As said barmalutka at this post:
    http://discussions.apple.com/thread.jspa?messageID=2888131&#2888131
    the problem is Acid Search, but I love this plugin, and have tried to deactivate the "find as you tipe" option, and the problem goes!
    No more problems, and AcidSearch runing

    Hi
    Welcome to Apple Discussions
    Strange. I use AcidSearch and my scroll arrows on my G4 iBook work as intended for page scrolling (I'm traveling, so I don't have access to my G5 iMac/Keyboard.) I'm wondering if the problem is specific to Intel machines, since you and the referenced thread are both using this type of machine?
    In my AcidSearch options, only the "enabled" box is selected in the "Find as you type" section.
    Post back

  • Muse pages don't scroll in preview

    I am not sure if it is a problem, but some pages I have created do not scroll in preview. They appear to work fine in browsers on desktop, tablet or phone. Is this a common problem with preview mode? Is there some setting I am failing to tick?

    Could you please share the screenshot demonstrating the issue you facing?

  • Screensaver images (portrait) don't scroll anymore...

    Ever since the introduction of Lion my Screensaver only shows the centre of photo's shot in portrait mode. Where as in the past, these images used to scroll (or flow) either up or down using the zoom and fill screen functions in system preferences. Landscape images also seem to be trimmed more than in the past, but at least they're (nearly) completely visible at some point. This problem with the portrait pics has really become a nuisance. I'm getting real tired of seeing only torso's but no heads. Does anyone have a solution or suggestion? Thanks in advance.

    Thanks for your reply. Yes I have, but then you're stuck with the black sidebars (vertical letterbox) instead of full screen images. I used to have all options checked, except the last one (keep slides centred). I still do, only now it's changed.
    To see what I mean, check out this video and jump to 7:09 min.
    You'll see the images scroll up or down. This is what no loger happens since Lion.
    Now, every image shows only the centre.... eventhough "keep slides centred" is unchecked.
    Mac OS X Snow Leopard: System Preferences — Personal (part 1) - YouTube

  • Nested Movieclips don't scroll after shift

    Hi,
    I am trying to set up a page scroller of sorts..my original plan was to have 3 movieclips placed on next to the other, within a single movieclip. When the next button is pressed the parent movieclip scrolls and reveals the next page, and the older page which is out of the screen is then moved to the last position by changing its .x value.
    Now everything works fine, and the previous clip is getting shifted to the new position. But it is not scrolling into the screen when the parent movieclip moves. The last moved page's .x remains constant..how is this possible??why is it not moving with the parent movieclip???
    If this is too confusing, imagine pg1, pg2, pg3 within pageHolder clip. Now when pageHolder scrolls left to reveal pg2 and a bit of pg3. I am moving pg1 to the orginal x,y coords of pg3 [which successfully happens]. But when pageHolder scrolls again, pg3 comes into view, but I cannot see pg1...[a bit of the next page stays in view], even though according to its co-ordinates, pg1 should be right there. But pg1's coordinates are not changing. Why is this happening???

    Hi Hakan,
    Thanks for the response. But I have managed to make it work. The fault was in calculating the value to make the shifting page move.
    Cheers,

  • Lock first column and row of a grid so they don't scroll of the screen

    Hello,
    In a flex app we use a grid with repeaters to build it dynamically depending on a datafeed. But we need the first row and column to stay always on the screen. Any ideas on how to do this ? Did a search for an example but couldn't find anything like it.
    I know it exists for a datagrid, but can't find any similar for a grid...
    http://flexonblog.wordpress.com/2008/04/22/lock-columns-and-rows-in-datagrid-for-visibilit y/
    Thanks for any ideas!
    Frank

    Doesn't exist for Grid container.  You might just remove the first items from the dataProvider and place them outside the Grid.
    Alex Harui
    Flex SDK Developer
    Adobe Systems Inc.
    Blog: http://blogs.adobe.com/aharui

  • Vertical Scrolling and Horizontal Wrapping in a JEditorPane

    Hey guys,
    Some of you may recall my [post |http://forums.sun.com/thread.jspa?threadID=5418688] from a couple weeks back. In it, I learned how to force (or appear to force) the text of a JEditorPane to grow from the bottom-up instead of top-down (picture the difference between how a chat window grows to how a word document grows). The solution (which solves my original problem perfectly) involves simply placing the JEditorPane into the South region of a JPanel.
    That was all fine and dandy, until I tried putting long lines of text into the JEditorPane. It scrolled vertically when it should have, but the text simply ran off the right side of the JEditorPane instead of wrapping (or showing a horizontal scrollbar).
    After a gross amount of googling, I finally came across this old [post |http://forums.sun.com/thread.jspa?threadID=5318664] that seems to be related to my problem here. It hinted that I should set the width of the JPanel to match the width of the JScrollPane's Viewport. While that does indeed fix the problem with horizontal wrapping, it now creates a problem with the vertical scrolling (which works fine without the fix for horizontal wrapping)!
    I've tried setting the preferred height of the JPanel to just about everything I can think of: the height of the viewport, extremely large numbers, negative numbers, zero, itself, the height of the JEditorPane. But they all do the same thing: no vertical scrollbar ever pops up, even when the text is obviously too long to fit in the window.
    Here's an SSCCE demonstrating what I'm talking about:
    import javax.swing.*;
    import java.awt.*;
    public class EditorPaneTest {
        public EditorPaneTest() {
             JFrame frame = new JFrame("EditorPane Test");
             frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
             JEditorPane textComponent = new JEditorPane();
             textComponent.setContentType("text/html");
             String text =
                  "This sentence should wrap and not cause the horiztonal scroll bar to display.<br/>"
                  + "<br/>This<br/>sentence<br/>should<br/>cause<br/>"
                  + "the<br/>vertical<br/>scroll<br/>bar<br/>to<br/>display.<br/>";
             textComponent.setText(text);
             JPanel panel = new JPanel(new BorderLayout());
             //the purpose of putting the JEditorPane in a JPanel
             //is to force it to the bottom with BorderLayout
             panel.add(textComponent, BorderLayout.SOUTH);
             JScrollPane scrollPane = new JScrollPane(panel, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
             //this line enables wrapping
             //but disables vertical scrolling
             //(comment it out to switch)
             panel.setPreferredSize(new Dimension(scrollPane.getViewport().getWidth(), scrollPane.getViewport().getHeight()));
             frame.add(scrollPane);
             frame.setSize(100, 200);
             frame.setVisible(true);
        public static void main(String[] args) {
            new EditorPaneTest();
    }As always, any pointers / suggestions / criticisms you can give me are greatly appreciated.
    Thanks again,
    Kevin

    camickr wrote:
    You need create a custom panel that implements the Scrollable interface. The key method to override to give you the behaviour you desire is the getScrollTracksViewportWidth() to return "true". This effectively fixes the width of the JEditorPane to the width of the viewport to wrapping is done as expected.That does handle the wrapping and scrolling, but it breaks the original problem: keeping a JEditorPane at the bottom of a JPanel. Using the ScrollablePanel you posted, the JEditorPane now stays at the top of the Panel instead of growing from the bottom.
    To see what I'm talking about, check out this code (the only difference between this and the previous code is the addition of your suggestion):
    import javax.swing.*;
    import java.awt.*;
    public class EditorPaneTest {
        public EditorPaneTest() {
             JFrame frame = new JFrame("EditorPane Test");
             frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
             JEditorPane textComponent = new JEditorPane();
             textComponent.setContentType("text/html");
             String text =
                  "This sentence should wrap and not cause the horiztonal scroll bar to display.<br/>"
                  + "<br/>This<br/>sentence<br/>should<br/>cause<br/>"
                  + "the<br/>vertical<br/>scroll<br/>bar<br/>to<br/>display.<br/>";
             textComponent.setText(text);
             ScrollablePanel panel = new ScrollablePanel();
             panel.setLayout(new BorderLayout());
             //the purpose of putting the JEditorPane in a JPanel
             //is to force it to the bottom with BorderLayout
             panel.add(textComponent, BorderLayout.SOUTH);
             JScrollPane scrollPane = new JScrollPane(panel, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
             //this line enables wrapping
             //but disables vertical scrolling
             //(comment it out to switch)
            //panel.setPreferredSize(new Dimension(scrollPane.getViewport().getWidth(), scrollPane.getViewport().getHeight()));
             frame.add(scrollPane);
             frame.setSize(100, 200);
             frame.setVisible(true);
        public static void main(String[] args) {
            new EditorPaneTest();
         public class ScrollablePanel extends JPanel
              implements Scrollable
              public Dimension getPreferredScrollableViewportSize()
                   return getPreferredSize();
              public int getScrollableUnitIncrement(
                   Rectangle visibleRect, int orientation, int direction)
                   return 20;
              public int getScrollableBlockIncrement(
                   Rectangle visibleRect, int orientation, int direction)
                   return 60;
              public boolean getScrollableTracksViewportWidth()
                   return true;
              public boolean getScrollableTracksViewportHeight()
                   return false;
    }Resize the window to make it taller. The text should stay at the bottom of the window, but now it stays at the top. I tried using a BoxLayout on the ScrollablePanel instead, and adding a Box.createGlue( ) before adding the JEditorPane. But that didn't change anything.

  • 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...
    ;-(

  • My down and up arrow buttons for scrolling don't work except on the firefox help page, it worked fine with chrome?

    I had google chrome before I switched to firefox due to the obsessive popups on chrome. All of a sudden the up and down keys don't scroll up and down on web pages, the only one they work on is the firefox help page. Any thoughts?

    In order to be able to find the correct solution to your problem, we require some more non-personal information from you. Please do the following:
    *Click the Firefox button at the top left, then click the ''Help'' menu and select ''Troubleshooting Information'' from the submenu. If you don't have a Firefox button, click the Help menu at the top and select ''Troubleshooting Information'' from the menu.
    Now, a new tab containing your troubleshooting information should open.
    *At the top of the page, you should see a button that says "Copy text to clipboard". Click it.
    *Now, go back to your forum post and click inside the reply box. Press Ctrl+V to paste all the information you copied into the forum post.
    If you need further information about the Troubleshooting information page, please read the article [[Use the Troubleshooting Information page to help fix Firefox issues]].
    Thanks in advance for your help!

  • Video's don't play in browser

    When I try to play certain types of videos, I get a picture of the QuickTime logo with an arrow under it and a message that says, "An error occurred inside a plugin contained on this page." Then, when I press OK, it says, "The plugin did not initialize properly." Then if I click that logo, it says, "The plugin was found, but an error in the plugin has occurred."
    Edit: Okay, now these videos don't have the plugin messages, but they just show up with the Quicktime logo with a question mark (?) above it.
    Also, videos on YouTube.com play fine, but videos embedded into another site just show up as what looks like a text box (like the one I'm typing into write this question), but don't scroll or anything... Is this related?
    It also might be helpful that the "Flash media" box is NOT checked in the Control Panel, and I've tried unchecking the "Play videos automatically."

    Check this thread:
    http://discussions.apple.com/thread.jspa?threadID=1014214&tstart=0
    Same problem, trying to cut down the double post with more details as to what the exact problem and what the work-arounds are.

  • My hyperlinks don´t work

    Hi !
    I´m a new iWeb user. I´ve created a website that works well in iWeb when hyperlinks are active, but when I publish it into a folder the lynks to my other pages in the menu bar don´t work. They worked well before I made some additions to the site (nothing special), but now the names of the pages in the menu bar of the home page don´t scroll. The link to an exteral page does work. I don´t want to publish it until I´m sure it will work properly.
    Thank´s

    Do a command A to select all and see if a text box or photo is overlapping the navigation and "covering" it.

  • JTextArea refuses to scroll.

    Having just read through some old post and not getting any change i thought i would post.
    I have two JTextArea (They used to be JEditorPanes, but i grew tired of the slow down from the ever growing return of getText) and when they were JEditorPanes, they would scroll. But now they wont.
    Below is an code stub...
    else {
         outputText =  "Prepared to overwrite "     + destination_locale.getAbsolutePath() + "...";
         outputEditor.append(outputText);
         outputEditor.setCaretPosition(outputEditor.getDocument().getLength());
    }And yes the TextArea is inside a ScrollPane...
              // Initialize the outputEditor.
              outputEditor = new JTextArea();
              outputEditor.setEditable(false);
              outputEditor.setPreferredSize(new Dimension(500, 150));
              outputEditor.setMaximumSize(new Dimension(500, 150));
              // Attach the outputEditor to its scroll.
              scroll2 = new JScrollPane(outputEditor);
              scroll2.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);

    1. Review http://java.sun.com/docs/books/tutorial/uiswing/components/textarea.html
    2. Post a small example program that compiles and exhibits the problem.
    3. Please post future Swing questions in the Swing forum.

  • TextPane always scroll to the bottom when append text

    How to avoid TextPane (inside scroll pane) to go to the bottom after append or set text. The current way I do is to scroll up again. This causes a noticable blink which I don't like very much. Could someone please point out if there is a setting I can do to say don't scroll?

    int pos = myTextArea.getCaretPosition();
    ...append text...
    myTextArea.setCaretPosition(pos);

Maybe you are looking for

  • How to get Mail 8.1 to forward an email based on Subject line?

    I am using Mail 8.1 under MacOSX 10.10 (Yosemite). I would like to create a rule that takes all mail received into a specific Mailbox and send or forward it to an email address which forms the Subject line of that email, changing the Subject line of

  • Accuracy of Cellular Network Positioning

    Most of Asha sereis like Asha 230, Asha 500 etc. comes with cellular nework positioning for GPS navigation. How much error or accuracy is there in determining current location by using this technology?

  • Updating a book through iTunes for Windows

    I purchased and downloaded a book through the iTunes Store, and it has since been updated.  My understanding is that I will need to delete the book from my library, and download it again, with this download being the updated version? I have been noti

  • CS6 Media Encoder won't open at all...

    I installed CS6 Master Suite... Media Encoder won't open at all. No error message... nothing when I click on the icon.  I opened a project in Premiere... exported it to the Que... No media Encoder window.. Help please... I'm dead in the water....

  • Nokia 5140i - doesnt save data onto SIM

    Hi! I have got a Nokia 5140i, which was SIM locked to T-mobile Austria. I did a SIM unlock on my own using Mastercode #1 and #7. In both cases it was accepted with a success message. Now using a foreign SIM card ("BOB") is working fine, but there is