JScrollPane - scroll unit too small

Hi,
I have a component that must be scrolled inside JScrollPane.
The problem is that a default scroll unit equals to 1px when I press scroll buttons or attempt to use mouse wheel that makes scrolling very lazy. How to increase scroll unit?
Anton

Try this (to use 10 instead of 1):
yourScrollPane.getVerticalScrollBar().setUnitIncrement(10);
yourScrollPane.getVerticalScrollBar().setBlockIncrement(10);

Similar Messages

  • How do i change font sizes and colors in ical in OS Lion.  Everything is greyed and too small.   And how do I changed the color of the scroll bars, which are now invisible?

    how do i change font sizes and colors in ical in OS Lion. Since upgrading,  all fonts are grey, instead of black,  and too small.   And how do I changed the color of the scroll bars, which also are grey and almost invisible?  And if you can asnwer this, can you tell me how to get back the email format I had before the upgrade?  I no longer have column headings and I'd like them.  Thank you. 

    Do you know about changing the font colors for ical, and the color of the scroll bars?
    No, I don't. I don't use that program; I fiddled with it just now, and could not find a way to do that.
    Perhaps someone else will have an idea.

  • When browser window cuts off content (is too small for the page) scrollbar wont scroll down to cropped content.

    Hey everyone,
    I'm having a new problem with Muse. This is my first Muse site, all my previous web work was HTML CSS, but I'm trying to learn the programs. However, I have a weird problem with my page... When the browser is too small - aka the window showing the site is cropping some of the content, the scroll bar appears, but wont scroll down it... I don't understand why. It seems to be happening in all browsers. Likewise, on some computers my footer is missing or invisible, not sure why, but on my computer in all browsers (firefox, chrome, safari) I don't have the problem. Any advice?
    www.DanielleFeliciano.com
    Also, in site properties I have the minimum height set to what would show the whole page, not sure what is going on. I've also noticed, that the scrollbar appears when the page is cropped, it just won't scroll the page..

    Looks like you have your content pinned on the homepage .... or on a layer that is pinned. Probably the header layer.

  • The font size on my e-mail app is too small. Zooming in results in scrolling for miles

    The font size  on my e-mail app is too small. I have already tried adjusting my font size preferences in the settings. It has no effect. The text seems zoomed out. When I zoom in manually, the text extends for miles to the right beyond the window size and I have to keep scrolling over to read. This is very annoying. It used to resize and readjust the text to fit within the screen. Is there a glitch in the app itself or have I somehow reset something which is causing this to happen? Is anyone else having this problem?

    Could you have the Zoom feature turned on?  Go to Settings>General>Accessibility and check/correct.

  • Use scrollbars when panel too small for components in it

    Hi
    I've got a JPanel which just uses flow layout to contain some components. The panel resizes with the JFrame it is in, and wraps the components to new "rows" of components if the width of the JFrame gets too small. Fine.
    If the space available is not sufficient, the components go off the bottom of the JPanel.
    So I thought "put the JPanel inside a JScrollPane".
    Problem is that the JScrollPane does not try to wrap the components to a new row of components if the width of the JFrame is too small. Instead, it displays the horizontal scrollbar, and ignores the fact that there is more space available.
    Below is some code - run the main method to see what I mean.
    If I set the layout for the JScrollPane to something else than the default ViewportLayout (eg GridLayout), then the components wrap to new rows as I want, but the horizontal scrollbar displays then, and it should not. Moreover, the vertical scrollbar never displays at all, even when the JFrame is not tall enough to display even a single rows of components.
    Can anyone show me what I am supposed to do?
    Thanks
    Mark
    package com.evotec.CCDViewer.Real3.mypackage;
    import java.awt.*;
    import javax.swing.*;
    public class TestScrollPanes extends JFrame  {
      private JScrollPane jScrollPane1 = new JScrollPane();
      private BorderLayout borderLayout1 = new BorderLayout();
      private JPanel jPanel1 = new JPanel();
      private JButton jButton1 = new JButton();
      private JButton jButton2 = new JButton();
      private JButton jButton3 = new JButton();
      private JButton jButton4 = new JButton();
      private JButton jButton5 = new JButton();
      private GridLayout gridLayout1 = new GridLayout();
      public TestScrollPanes() {
        try {
          jbInit();
        } catch(Exception e) {
          e.printStackTrace();
        this.setSize(500,500);
        this.setDefaultCloseOperation(EXIT_ON_CLOSE);
        this.setVisible(true);
      public static void main(String[] args) {
        new TestScrollPanes();
      private void jbInit() throws Exception {
        this.getContentPane().setLayout(borderLayout1);
        this.setSize(new Dimension(354, 270));
        jScrollPane1.getViewport().setLayout(gridLayout1);
        jButton1.setText("jButton1");
        jButton2.setText("jButton2");
        jButton3.setText("jButton3");
        jButton4.setText("jButton4");
        jButton5.setText("jButton5");
        jPanel1.add(jButton1, null);
        jPanel1.add(jButton2, null);
        jPanel1.add(jButton3, null);
        jPanel1.add(jButton4, null);
        jPanel1.add(jButton5, null);
        jScrollPane1.getViewport().add(jPanel1, null);
        this.getContentPane().add(jScrollPane1, BorderLayout.CENTER);
    }

    Custom24, the problem you are running into is due to a conflict between the
    FlowLayout and the ScrollPane; FlowLayout only wraps components when
    it hits the width of the panel, but inside a ScrollPane, the panel can be as
    wide as it wants. So, you have to limit that somehow. Also, FlowLayout goes
    right after the width of the panel, not the preferred width, and not via an
    accessor; it uses it directly.
    So, this seems to work.
    import java.awt.*;
    import javax.swing.*;
    public class TestScrollableFlowPanel extends JFrame {
         public static void main( String[] args ) {
              Runnable doEDT = new Runnable() {
                   public void run() {
                        new TestScrollableFlowPanel();
              SwingUtilities.invokeLater( doEDT );
         public TestScrollableFlowPanel() {
              try {
                   jbInit();
              } catch ( Exception e ) {
                   e.printStackTrace();
              this.setSize( 300, 300 );
              this.setDefaultCloseOperation( EXIT_ON_CLOSE );
              this.setVisible( true );
         private void jbInit() throws Exception {
              ScrollableFlowPanel panel = new ScrollableFlowPanel();
              for ( int k = 0; k < 120; k++ )
                   panel.add( new JButton( "Button"  + k ) );
              JScrollPane scroll = new JScrollPane( panel );
              this.getContentPane().setLayout( new BorderLayout() );
              this.getContentPane().add( scroll, BorderLayout.CENTER );
         static public class ScrollableFlowPanel extends JPanel implements Scrollable {
              public void setBounds( int x, int y, int width, int height ) {
                   super.setBounds( x, y, getParent().getWidth(), height );
              public Dimension getPreferredSize() {
                   return new Dimension( getWidth(), getPreferredHeight() );
              public Dimension getPreferredScrollableViewportSize() {
                   return super.getPreferredSize();
              public int getScrollableUnitIncrement( Rectangle visibleRect, int orientation, int direction ) {
                   int hundredth = ( orientation ==  SwingConstants.VERTICAL
                             ? getParent().getHeight() : getParent().getWidth() ) / 100;
                   return ( hundredth == 0 ? 1 : hundredth );
              public int getScrollableBlockIncrement( Rectangle visibleRect, int orientation, int direction ) {
                   return orientation == SwingConstants.VERTICAL ? getParent().getHeight() : getParent().getWidth();
              public boolean getScrollableTracksViewportWidth() {
                   return true;
              public boolean getScrollableTracksViewportHeight() {
                   return false;
              private int getPreferredHeight() {
                   int rv = 0;
                   for ( int k = 0, count = getComponentCount(); k < count; k++ ) {
                        Component comp = getComponent( k );
                        Rectangle r = comp.getBounds();
                        int height = r.y + r.height;
                        if ( height > rv )
                             rv = height;
                   rv += ( (FlowLayout) getLayout() ).getVgap();
                   return rv;
    }: jay

  • All of a sudden the screen on my iMac 10,1 is too small for the image. Can't figure out how to reduce the size of the Finder or any of the Apps.

    All of a sudden the screen is too small for the image. Hard to explain, but in order to see the entire Finder window, I must scroll the image up/down, left/right.
    It's not just the Finder though, all of the apps are affected this way too.
    It's probably got something to do with the fact that I have an HDMI cable running from the Mac to a Vizio 42" TV. It's been running this way just fine for over two months though.
    Any ideas?

    You probably accidently zoomed the screen.  Hold down CNTL while scrolling down with the mouse or trackpad to unzoom.  Cntl - scroll up to zoom.
    Regards,
    Captfred

  • Itunes screen too small

    ok i just got a new ipod nano and i downloaded the new software. when i connect it and it shows up to say register your ipod its too small to see and i can't see it say register now just register later on the left side. what should i do?

    Hello and Welcome to Apple Discussions. 
    Two options:
    1. Increase your computer's display resolution above 1024x768 (XGA) or
    2. Click the left hand pane scroll bar and drag to the left, shrinking it to the point where the Register button appears on the right.
    Merry Christmas
    mrtotes

  • Discoverer Plus Title frame height is too small

    The Discoverer Plus default title frame height is too small to display more than a couple of lines of the report titles without scrolling. Discoverer Viewer displays the entire title area. Is there any way to increase the default height of the title frame in Plus?
    Thanks, Jim

    There is a default hieght that the title frame occupies in Discoverer Plus. If I remember, the title frame by default will not use more than 15% of the available vertical space in the Plus window - again, not sure if this includes the browser chrome or not. You can drag and increase the size of this title frame such that it occupies more of the available screen real estate.
    In Viewer, since the title is rendered as HTML - it will simply expand to show its entire contents.
    thanks
    Abhinav
    Oracle Business Intelligence Product Management
    BI - http://www.oracle.com/bi
    BI - http://www.oracle.com/technology/bi
    Blog - http://blogs.oracle.com/
    BI Blog - http://oraclebi.blogspot.com/

  • "The data area passed to a system call is too small" NFS client Windows 2008 R2 SP1

    Hi
    I need to map a Hyper-V virtual windows server to a UNIX folder, but when i made de mapping and tried to navigate in to the mapped unit and shows me:
    "The data area passed to a system call is too small"
    I tried too many things like adding a registry key (and windows 2008 r2 already has)
    Use a similar account between Unix and Windows domain
    I done the steps in the document:
    http://technet.microsoft.com/en-us/library/cc753302(WS.10).aspx
    And nothing, this is just frustrating, also I disabled the firewall in the virtual machine and the host server.
    I have a Windows 2008 Domain R2 functionality and the virtual machine is Windows 2008 R2 too.
    The version of unix are:
    AIX6.1  x64
    AIX 6.3 x64
    AIX 5.1  x86
    Any Idea?
    Thanks!
    Doc MX

    Hi,
    You may perform the following troubleshooting suggestions:

    Change how your NFS servers export the NFS shares and make them allow connections from high ports.

    Add UseReservedPorts DWORD value under HKLM\Software\Microsoft\Client for NFS\CurrentVersion\Default and set it to 1. Restart the Client for NFS service to allow
    the change to take effect.
    For more information, please refer to the following Microsoft MSDN blog:
    "Network Error 53", "The data area passed to a system call is too small" or "Unknown Error"
    http://blogs.msdn.com/b/sfu/archive/2011/07/14/3087987.aspx
    Regards,
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

  • Space for video titles is too small!

    Hi,
    Am I missing something? The amount of space assigned to a video title is too small - for example I have 3 podcasts called
    OnSoftware - Secure Coding in C and C++ with Robert Seacord - Part 1
    OnSoftware - Secure Coding in C and C++ with Robert Seacord - Part 2
    OnSoftware - Secure Coding in C and C++ with Robert Seacord - Part 3
    The video list shows 3 videos called 'Secure Coding in C...' - how would I know which one is which?
    And no, they're not in numerical order!
    Is there any way to get the video title to scroll to see the rest of it?
    Cheers,
    Steve.

    I agree with this, hopefully well have scrolling text in the future, as per previous iPods.

  • Error message: ORA-00821: Specified value of sga_target 4M is too small

    Dear all
    My database instance is down,when I am trying to start, it throw any error:
    ORA-00821: Specified value of sga_target 4M is too small, needs to be at least 28M
    The problems started when erroneous altered sga_target to some values without specifying the unit.
    My question is, how can I resolve this issue while the database instance is down? I am using spfile
    I tried to start the instance with pfile (startup pfile='D:\oracle\product\10.2.0\admin\orcl\pfile\init.ora') it throw errors:
    LRM-00109: could not open parameter file 'D:\oracle\product\10.2.0\admin\orcl\pfile\init.ora'
    ORA-01078: failure in processing system parameters
    Please any one to help me
    Regards
    Sadock

    Hi,
    What you can do in this case and you don't have a good pfile, you can do the following:
    1. locate the spfile, normally in the $ORACLE_HOME/dbs directory
    2. Make a copy from the spfile to be sure will not be damaged.
    3. Do on unix prompt: strings -a <spfile> > newpfile.ora
    4. Check with an editor the newpfile.ora and edit. The pfile will contain all the settings and you should change the SGA_TARGET value to a size of 400M or higher. Smaller values can be done but are not advisable at 10GR2 or higher.
    5. Try to startup the database using the updated newpfile.ora.
    Hope this will solve your issue.
    Regards, Gerwin

  • I'm new to Mac's and I find the display's just slightly too small. I'd like to increase the size for all my program. Is there a single setting that I can change?

    I'm new to Mac's and I find the display's just slightly too small. I'd like to increase the size of my display for all my programs. Is there a single setting that I can change as a default setting?

    You can drop the resolution a little, but it makes everything blurry.
    OS X isn't as friendly like Windows is to give some UI adjustment, one of many major complaints about the platform that has gone unheeded for years now.
    As a lifelong Mac user who's eyes are going due to age, I'm really liking Windows 7 more and more every day.
    If you use Firefox, NoSquint and Theme Font & Size Changer add-ons, with a nice persona that makes better contrast, tweak the FF toolbars, you can at least make your web surfing tolerable on Mac's.
    Also you can set a Control key in System Preferences > Universal Access plus a scroll wheel mouse, if you need to zoom in/out certain areas of OS X, however for a pernament UI scale solution there is none that's practical, unless you have a large room, a projector and a smooth wall.
    A larger monitor won't work up close neither, however dropping the resolution and sitting back a bit might sharpen the images a bit.
    The UI really needs to be adjustable and it's not.

  • GridBagLayout too small!

    I'm tyring to develop a chat application for a class assignment and the gridBagLayout I've got has the elements too small. How do I get them the right size?
    JTextArea areaDisplay = new JTextArea("JTextArea", 400, 400);
    areaDisplay.setEditable(false);
    areaDisplay.setBackground(white);
    JScrollPane jSP = new JScrollPane(areaDisplay);
    jSP.setPreferredSize(new Dimension(400,400));
    JTextField fldMessage = new JTextField("JTextField", 200);
    fldMessage.setColumns(50);
    fldMessage.setBackground(white);
         JTextArea userDisplay = new JTextArea("User Area");
         userDisplay.setEditable(false);
         JButton butSend = new JButton("Send");
         butSend.addActionListener(this);
    JButton butExit = new JButton("Exit");
    butExit.addActionListener(this);
    JPanel c = (JPanel)getContentPane();
    gbl = new GridBagLayout();
    JPanel content = (JPanel)getContentPane();
    gbc = new GridBagConstraints();          
    gbc.weighty = 0.0;
    gbc.weightx = 0.0;
    gbc.fill = GridBagConstraints.BOTH;
    gbc.gridwidth = GridBagConstraints.REMAINDER;
    addComponent(jSP, 0, 0, 2, 25);
    addComponent(fldMessage, 2, 0, 2, 1);
    addComponent(butExit, 3, 0, 1, 1);
    addComponent(butSend, 3, 1, 1, 1);
    addComponent(userDisplay, 0, 2, 1, 29);
    setSize(400,400);
    setVisible(true);

    GridBagLayout pays the most attention to preferred size. use setPreferredSize() on components you are adding to the GridBagLayout

  • JTable is display too small, after a pack() it's too height

    i have a table of 5 columns and 2 rows
    it is placed on a scrollpane and then in an internal frame
    the result is a table that is displayed too small (height=32 == getPreferredSize().height)
    if i add a pack() statement then it is displayed too big, width is ok but height =~ 500 (should be approx. 100
    what to do?

    thank you! i like the one-liner!
    however it works only the first time, not the second time when rows are added
    DefaultTableModel model;
    JTable table;
    String[] columnNames;
    Object[][] data;
    columnNames = new String[5];
    columnNames[0] = "N"; columnNames[1] = "T"; columnNames[2] = "E";
    columnNames[3] = "E"; columnNames[4] = "P";
    data = new Object[2][5];
    data[0][0] = "e"; data[0][1] = "i"; data[0][2] = "e"; data[0][3] = "-"; data[0][4] = "2";
    data[1][0] = "s"; data[1][1] = "f"; data[1][2] = "s"; data[1][3] = "2"; data[1][4] = "2";
    model = new DefaultTableModel(data, columnNames);
    table = new JTable(model);
    table.setPreferredScrollableViewportSize(table.getPreferredSize());
    // table is show with perfectheight of 2 rows
    JScrollPane scrollPane = new JScrollPane(table);
    internalFrame.add(scrollPane);
    internalFrame.pack();
    data = new Object[3][5];
    data[0][0]="A0";data[0][1]="A1";data[0][2]="A2";data[0][3]="A3";data[0][4]="A4";
    data[1][0]="b0";data[1][1]="b1";data[1][2]="b2";data[1][3]="b3";data[1][4]="b4";
    data[2][0]="c0";data[2][1]="c1";data[2][2]="c2";data[2][3]="c3";data[2][4]="c4";
    model = new DefaultTableModel(data,columnNames);
    table.setModel(model);
    table.setPreferredScrollableViewportSize(table.getPreferredSize());
    // still a height of 2 rows instead of 3i have the feeling that i make it too complex :-(

  • Add bookmark window too small

    Does anyone find the window that opens when you add a bookmark WAY TOO SMALL. If you have more than 6 folders it creates scrolling through a tiny window to find a folder.

    first of, and mostly, why isn't that box movable and re-sizable in the first place?
    It's a window for god sack!!! Why do we have to stuck in the face with that "make believe box" ??

Maybe you are looking for

  • Problem with itunes and quicktime

    I installed the lastest version itunes, then itunes crashed on me, then microsoft crash analysis popped up with a message to unistall quicktime and then to repair itunes. So I did that and now itunes will not work and when I click on the itunes icon

  • Preview and highlighting

    Just recently whenever I use Preview and annotate my documents I get this weird triangular shade on the word I highlighted instead of the usual blocked look. How do I change this back?? Here is how it looks: http://i248.photobucket.com/albums/gg175/m

  • How can i write to the Step.Result.ReportText of a Sequence callback?

    i need to write to the Step.Result.ReportText and step.Result.Status of a sequence callback using a statement but it jus won't work...how can i do this?....

  • Crystal Report Parameter not showing in IPAD

    Hi All,  I create simple Purchase register report  by using Crystal report with date parameter My problem is that report not working on Ipad and its showing blank space .   The report working fine on ipad when i run report without parameter. Kindly t

  • NOKIA_6233_rus

    Hello, I`am from Ukraine. I`ve allready updatet my nokia_6233, problem - There is not in new softwere russian or ukranian lenguage. Pls help.