JScrollPane - change vertical scroll-bar

I am developing an application to be run on a touch-screen monitor. The customer has asked that I make the vertical scroll-bar on the tables easier to use. How do I set the width of the scroll-bar(s) in a JScrollPane?

Do you want to set the width of all vertical scroll bars (and in that case, probably also the height of all horizontal scroll bars too) OR the width of one specific scroll bar of one specific scroll pane?
db

Similar Messages

  • Help:Jtextpane in Jscrollpane , the vertical scroll bar  at bottom

    Immediate help needed if possible.
    The scrollpane that contains the textpane is showing the vertical bar at the bottom of the page even if use :-
    scrollRectToVisible(new Rectangle(0,0,1,1));
    Here is my code:-------------------------
    JPanel panel = new JPanel();
    JTextPane textPane = createTextPane();
    textPane.setEditable(false);
    textPane.scrollRectToVisible(new Rectangle(0,0,1,1));
    JScrollPane paneScrollPane = new JScrollPane(textPane);
    paneScrollPane.setPreferredSize(new Dimension(525, 285));
    paneScrollPane.setMinimumSize(new Dimension(14, 48));
    gc.addCentered(paneScrollPane);
    add ( panel );

    From
    http://search.java.sun.com/search/java/index.jsp?qp=&nh=10&qt=%2Btitle%3Ajtextpane+%2Btitle%3Atop&col=javaforums
    scrollRectToVisible(new Rectangle(0,0,1,1))

  • Keep vertical scroll bar still y JScrollPane

    Hello all!
    I have got a JTable added into a JScrollPane, which scroll bars are always shown.
    I have to repaint the JTable each 3 seconds and I would like to keep the vertical scroll bar in its original position, for example if I am watching row 24 of the JTable when the JTable is repainted I would like the vertical scroll bar to be in the same position as it was before repainting because now the vertical scroll bar is repainted always at the top...
    With the horizontal bar it works, the bar does not move from its previous state when the JTable is repainted...
    Any idea of what is happening?
    Thanks in advance :)

    This would do for u! ... do it after you have updated the table with the new rows... if you are not using the default table model then you can still get the row count through your JTable object ...
    This part moves the scrollbar to the last row coz im doing "myDefaultTableModel.getRowCount()-1", you can keep the current row index in an instance level variable bjust before refreshing the table and use it in this.setRowSelectionInterval() method ...
    this.setRowSelectionInterval(myDefaultTableModel.getRowCount()-1, myDefaultTableModel.getRowCount()-1);
    this.setColumnSelectionInterval(1, 1); //didnt need any specific column coz I wanted the row basically..
    this.scrollRectToVisible(this.getCellRect(this.getSelectedRow(), 1, true));This basically selects the given row and then moved the scrollbar over to that point as well ...
    OR, here's another alternative!! you can also get the current scrollbar value similarly jsut before refreshing and pass that on to this method ...
    this.jScrollPane1.getVerticalScrollBar().setValue(jScrollPane1.getVerticalScrollBar().getValue());Hope it helps...
    Cheers!
    Asim

  • Question on vertical scroll bars in JScroll Pane

    Hi,
    I managed to display my chat program with a vertical scroll bars by using JScrollPane. Every time some on types a line, this is appended to whatever was previously in the JTextArea (the JScrollPane has a JTextArea in it). Even though this works fine, when the dimension of the JTextArea is full with text, one has to scroll down to see what was the last line of text that was typed.
    Is there a way to make the verticall scroll area alwas scrolled down (I mean, scrolled to the bottom so I can see new incoming text without manually having to scroll it down?)
    Thanks!
    Cecilia.

    You might try adding a properties listener to the JTextArea listening for a "resize/size" property change and when it does, force the scroll bar to go to max.

  • Textarea: strange vertical scroll bar

    Hi, everyone
    I implemented textarea with JTextPane, code is below.
    The problem is that,
    when there is only one pane in the content of HBox, the vertical scroll bar runs normal;
    but when there is 2 panes, the vertical scroll bar changes between visible and invisible again and again.
    My code wrong? or a bug of JavaFX?
    Thanks.
    * TextArea.fx
    * Created on 2009-12-5, 22:27:47
    package morsshow;
    import javafx.stage.Stage;
    import javafx.scene.Scene;
    import java.awt.Dimension;
    import javax.swing.JScrollPane;
    import javax.swing.JTextPane;
    import javafx.ext.swing.SwingComponent;
    import javafx.scene.layout.HBox;
    * @author icycandy
    var text: JTextPane = new JTextPane();
    var pane: JScrollPane = new JScrollPane(text,JScrollPane.VERTICAL_SCROLLBAR_ALWAYS ,JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
    text.setText("youyouyouyouyouyouyouyouyouyouyou");
    text.setPreferredSize(new Dimension(500, 300));
    var text1: JTextPane = new JTextPane();
    var pane1: JScrollPane = new JScrollPane(text1,JScrollPane.VERTICAL_SCROLLBAR_ALWAYS ,JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
    text1.setText("lovelovelovelovelovelovelovelovelovelove");
    text1.setPreferredSize(new Dimension(500, 300));
    Stage {
        title: "love you"
        scene: Scene {
            content: [
                HBox{
                    content:[
                        SwingComponent.wrap(pane),
                        //SwingComponent.wrap(pane1)
    }

    Hi,
    I've just used the following SQL statement to create a tabular form:
    select
    "EMPNO",
    "EMPNO" EMPNO_DISPLAY,
    "ENAME",
    "PHONE1",
    APEX_ITEM.TEXTAREA(5, PHONE2, 5, 50, 'style="overflow-Y:scroll"') "PHONE2"
    from "#OWNER#"."EMP"PHONE2 is a small field, so you probably won't be able to save anything, but this statement is used in: http://htmldb.oracle.com/pls/otn/f?p=33642:100
    Both in IE7 and FF3, the scroll area appeared on the right of the box.
    Andy

  • Vertical Scroll bars in analysis - View all rows

    Users want to see the whole report displayed in one page with only a vertical scroll bar. They do not want the up/down arrows. Is this possible in OBIEE?
    Thanks.
    Ad

    To implement the solution, please do:
    1. Change instanceconfig.xml file in <biee11g_install>\instances\instance1\config\OracleBIPresentationServicesComponent\coreapplication_obips1 as following
    <Views>
    <Pivot>
    <!--This Configuration setting is managed by Oracle Business Intelligence Enterprise Manager-->
    <DefaultRowsDisplayedInDelivery>75</DefaultRowsDisplayedInDelivery>
    <!--This Configuration setting is managed by Oracle Business Intelligence Enterprise Manager-->
    <DefaultRowsDisplayedInDownload>2500</DefaultRowsDisplayedInDownload>
    <!--This Configuration setting is managed by Oracle Business Intelligence Enterprise Manager-->
    <DisableAutoPreview>false</DisableAutoPreview>
    <MaxVisibleColumns>5000</MaxVisibleColumns>
    <MaxVisiblePages>2500</MaxVisiblePages>
    <MaxVisibleRows>500000</MaxVisibleRows>
    <MaxVisibleSections>5000</MaxVisibleSections>
    </Pivot>
    <Table>
    <!--This Configuration setting is managed by Oracle Business Intelligence Enterprise Manager-->
    <DefaultRowsDisplayedInDelivery>75</DefaultRowsDisplayedInDelivery>
    <!--This Configuration setting is managed by Oracle Business Intelligence Enterprise Manager-->
    <DefaultRowsDisplayedInDownload>2500</DefaultRowsDisplayedInDownload>
    <MaxVisiblePages>2500</MaxVisiblePages>
    <MaxVisibleRows>500000</MaxVisibleRows>
    <MaxVisibleSections>5000</MaxVisibleSections>
    </Table>
    </Views>
    3. Note the new elements added are the following to both <Pivot> and <Table>, the Pivot part controls Pivot view, and Table part controls Table View, my testing was done with Table View.
    <MaxVisiblePages>2500</MaxVisiblePages>
    <MaxVisibleRows>500000</MaxVisibleRows>
    <MaxVisibleSections>5000</MaxVisibleSections>
    4. Restart Presentation Server from EM, then run your request, do excel export to verify.
    Thanks...

  • Problem getting vertical scroll bar in tree

    Hi,
    I am adding nodes to a tree control dynamically. But somehow,
    a vertical scroll bar doesn't appear during the process. I guess,
    somehow, the tree is not able to detect the change in the height,
    hence, is not giving the vertical scroll bar. However, after a node
    has been populated with the sub-nodes, when I close that node and
    re-open it, then the scroll bar appears. I really need to fix it as
    soon as possible. Plz help!
    Thanks in advance,
    Cheree

    Seems like Flex 4 is working fine:
    This is the updated code working on Flex 4.6 using XMLCollection:
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                   xmlns:s="library://ns.adobe.com/flex/spark"
                   xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" applicationComplete="application1_applicationCompleteHandler(event)">
        <fx:Declarations>
            <!-- Place non-visual elements (e.g., services, value objects) here -->
        </fx:Declarations>
        <fx:Script>
            <![CDATA[
                import mx.collections.ArrayCollection;
                import mx.collections.XMLListCollection;
                import mx.controls.Tree;
                import mx.events.FlexEvent;
                import mx.events.TreeEvent;
                [Bindable]
                public var treeData: XMLListCollection=new XMLListCollection();
                private var hasRun: Boolean = false;
                //finalSrcList is the ArrayCollection that has value objects returned from data base by a remote object.
                public function populateTree(event:TreeEvent): void{
                    if (hasRun == false){
                        hasRun = true;
                        var parentNode:XML=event.item as XML;
                        var temp:XML;
                        var i: int;
                        var finalSrcList: ArrayCollection = new ArrayCollection();
                        // Prepare source list
                        for (i=0; i<10; i++){
                            var item = new Object();
                            item.attribute1 = "attribute " + i.toString();
                            item.attribute2 = i.toString();
                            finalSrcList.addItem(item);
                        for(i=0;i<finalSrcList.length;i++){
                            temp= <node label={finalSrcList[i].attribute1} id={finalSrcList[i].attribute2} isBranch="true"/>;
                            event.currentTarget.dataDescriptor.addChildAt(parentNode,temp,0);
                protected function application1_applicationCompleteHandler(event:FlexEvent):void
                    var rootItem: XML;
                    rootItem = <root label="root" id="1000">
                        <node label="level1" id="2000" isBranch="true"/>
                        </root>;                                   
                    treeData.addItem(rootItem);
            ]]>
        </fx:Script>
        <mx:Panel width="600" height="250" paddingBottom="20" paddingLeft="20" paddingRight="20" paddingTop="20"
                  verticalAlign="middle" horizontalAlign="center">
            <s:Label>
    This is using XMLCollection
            </s:Label>
            <mx:Tree id="funcTree" height="100%" width="100%" dataProvider="{treeData}" labelField="@label" showRoot="false"
                     itemOpen="populateTree(event)" />       
        </mx:Panel>                  
    </s:Application>

  • Vertical scroll bar disappears when I minimize the screen

    I have Firefox 10.0.2. I do have a vertical scroll bar with both the up and down button; however, they all disappear when I minimize the screen. When I am in Ancestry, for example, when I minimize I get a horizontal scroll bar but there is no vertical scroll bar. I have no clue what to do. I minimize screens a lot when I am in Ancestry and it gets very frustrating. Can anyone help?

    Hi,
    Please check if this happens in [https://support.mozilla.com/en-US/kb/Safe%20Mode Safe Mode].
    [http://kb.mozillazine.org/Problematic_extensions Problematic Extensions]
    [https://support.mozilla.com/en-US/kb/Troubleshooting%20extensions%20and%20themes Troubleshooting Extensions and Themes]
    [http://support.mozilla.com/en-US/kb/Uninstalling+add-ons Uninstalling Add-ons]
    [http://kb.mozillazine.org/Uninstalling_toolbars Uninstalling Toolbars]
    Safe mode disables the installed '''Extensions''', and themes ('''Appearance''') in '''Tools''' ('''Alt''' + '''T''') > '''Add-ons'''. Hardware acceleration is also temporarily disabled - the manual setting is '''Tools''' > '''Options''' > '''Advanced''' > '''General''' > '''Use hardware acceleration when available'''. [https://support.mozilla.org/en-US/kb/Options%20window%20-%20Advanced%20panel?as=u Options > Advanced]. All these settings/add-ons can also be individually or collectively disabled/enabled/changed in Firefox normal mode to check if an extension, theme or hardware acceleration is causing issues.
    If the problem persists, you can also try disabling the '''Plugins''' in Tools > Add-ons temporarily to check.

  • Vertical scroll bar in table control with wizrads

    Hi,
      Im working on a table control with a customised table. I created a table control with wizards. But vertical scroll bar is not working. How can i invoke vertical scroll bar and can any one provide the code for the all the operations on a table control like save,find,find next,change....Thanks in advance.
    Avinash

    Hi Avinash
    move the records number of your internal table into field LINES of tablecontrol. So you should change the code generated by wizard in PBO, for example create a new module:
    PROCESS PBO
    MODULE SET_DATA_TO_T_CTRL.
    LOOP..
    ENDLOOP.
    MODULE SET_DATA_TO_T_CTRL.
       DESCRIBE TABLE ITAB LINE SY-TABIX.
       <TABLECONTROL>-LINES = SY-TABIX.
    ENDMODULE.
    Max

  • Some new pages open without a vertical scroll bar...even tho the page is very long.

    It only happens with one particular vendors website. They can't explain it. Most of their web pages work fine.
    I selected an imbedded link from one page and a new browswer window opens and populates but there is no left margin vertical scroll bar. And there is lots of data below to view. CAnt get there from here.
    Damon

    Can you share the link to the page?
    Does it make any difference if you change the zoom level, such as by holding down Ctrl and tapping the + key or the - key a couple of times?
    New windows opened by a script can be customized by leaving out some elements. Presumably if they were doing that, they would know. However, just in case, you could prevent sites from removing the scrollbars from popup windows.
    (1) In a new tab, type or paste '''about:config''' in the address bar and press Enter. Click the button promising to be careful.
    (2) In the search box that appears above the list, type or paste '''window_o''' and pause while the list is filtered
    (3) Double-click the '''dom.disable_window_open_feature.scrollbars''' preference to switch it from false to true.
    (The name of this preference is difficult to understand, but it means that Firefox will block the site from turning off scrollbars on a new window if set to true.)

  • Vertical scroll bar disappears on the timeline?

    After I use the vertical scroll bar once it disappears and I am unable to scroll. If I click the film strip on and off, it comes back. Is there a way to always keep the scroll bar visable on the timeline?

    That has got to be a bug. Go to the Motion menu and Provide Motion Feedback... !
    Otherwise, you can scroll with your mouse. I use a mouse with a scroll wheel, but I think I remember the magic mouse has a scroll gesture(?).
    You can make the layers smaller by mousing over one of the lines in the layers list to the left of the timeline. The cursor should change to a double-pointed arrow. Click and drag the layers smaller.
    You can open the timeline window wider by mousing over the Timeline top border, and click drag to make it larger.
    I use this feature so rarely that I had never noticed before. When the scroll bar does appear, it's not "fully formed" either -- just a grey bar -- no resize controls on the ends at all.

  • Vertical scroll bar disappeared

    Vertical scroll bar gone--most annoying when trying to use my google calendar. I read the help responses and couldn't figure out what to do.

    This issue can be caused by the Babylon Toolbar extension
    *https://support.mozilla.com/kb/Troubleshooting+extensions+and+themes
    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.com/kb/Safe+Mode

  • Flex Tree Vertical Scroll Bar Issue

    When i click on the + image of flex tree than first time the vertical scroll bar is not coming but when when i minimize it and again click on + than it appears can any one tell me what is the issue??

    Hi Rob,
    I have tried changing styles of those div's in  which I have my dropdown's are there but it didnt work.
    Below is the code for reference:
    <div class="k-animation-container km-popup" style="width: 250px; height: 206px; margin- padding- padding-right: 10px; padding-bottom: 15px; display: none; "><div class="k-list-container k-popup k-group
    k-reset" id="MaintenanceType-list" data-role="popup" style="height: 200px; display: none; font-family: 'Segoe UI', Verdana, Tahoma, Arial; font-size: 11px; font-style: normal; font-weight: normal; line-height: normal; width: 244px; -webkit-transform: translateY(-206px);"><ul
    unselectable="on" class="k-list k-reset" tabindex="-1" role="listbox" aria-hidden="true" id="MaintenanceType_listbox" aria-live="off" style=""><li tabindex="-1" role="option" unselectable="on" class="k-item"></li><li tabindex="-1" role="option"
    unselectable="on" class="k-item">AUX - Accessories belonging to EA group</li><li tabindex="-1" role="option" unselectable="on" class="k-item">ARL - Artificial Lift</li>
    Regards,
    Jyothi

  • Vertical Scroll Bars not wanted

    I have read other messages, but I cannot figure out why the
    vertical scroll bar still appears in IE even though there is no
    content below. The bar is there but not useable. Is there some code
    that will turn this off when not needed?

    That's the way IE (and some other browsers) works. It always
    draws a
    vertical scrollbar. If the scrollbar is not needed, it is
    "ghosted" and
    not usable, as you have noticed. When the page's content
    exceeds the
    window height the ghosted scrollbar rises from the grave and
    becomes alive.
    Other browsers do not add a scrollbar until one is needed.
    Some people
    don't like this because the addition of the scrollbar removes
    some space
    from the window, making it a bit narrower, and page elements
    that are in
    some way positioned or sized in relation to the window's
    width will
    shift and/or change size slightly.
    IE's solution prevents this content shifting at the expense
    of devoting
    part of the window to a non-functioning interface element
    some of the time.
    (It is my belief that either method of handling the vertical
    scrollbar
    is fine, and skilled designers will not create pages that
    fall apart if
    a scrollbar should appear where there was none before. For
    the record, I
    subscribe to the no-scrollbar-at-all-until-one-is-needed
    doctrine.)
    James M. Shook
    http://www.jshook.com

  • Vertical scroll bar in a tree node

    Hi Friends,
    I am trying to create a tree in Apex 4.0. I need a vertical scroll bar in my tree nodes if the no: of values is greater than 8. For example i am having a tree with customers and sites. When i press the customers it will list the sites under that customer. I need a vertical scroll bar to be displayed for sites if the no: of sites is greater than 8, so that i can limit the size of the tree. Is there any ways to achieve this in Apex 4.0. Any input for this will be appreciated.
    Thanks,
    Nav

    Hi,
    My test page was upgraded to version 4 along with the rest of the OTN workspaces. I still have access to the tree template but can not guarantee how long that will last as I have no idea behind the reasoning for removing access to new tree's templates. You can access existing old trees by changing the app:page in the URL to 4000:28 - but, note, that new Apex 4 trees are not included on this page as they are generated by widgets not by templates.
    For my old tree, to add the scrolling around the entire tree, I edited the tree's template - by clicking on the Tree link in the region - and added the following at the top of the "Before Tree" setting:
    &lt;div style="height:200px; width:300px; overflow-y:auto;"&gt;and add the following to the bottom of the "After Tree" setting:
    &lt;/div&gt;I have not, as yet, been able to find a way of adding scrollbars within a list when there are more than x number of entries.
    Andy

Maybe you are looking for