Corner Button with only a Vertical Scroll Bar

I would like to have a corner button but the ScrollPane only requires a Vertical ScrollBar, and thus there is no room for the button. I understand it is possible to have a Heading which will then create the corner space required for a button, could somebody please point me to an example of a heading with a single line of text.
The ScrollPane does not contain a Table but a TextPane containing document.
Thanks
Rich

Something like this should work...
JLabel columnHeaderComponent = new JLabel("some text in one line...");
JScrollPane scrollPane = new JScrollPane(someComponent);
scrollPane.setColumnHeaderView(columnHeaderComponent);In order to have more control over the columnHeaderComponent you should write your own class that overwrites getPreferredSize, getMinimumSize and getMaximumSize so that the component fits your needs.
Finally you do something like...
scrollPane.setCorner(JScrollPane.UPPER_LEFT_CORNER, topLeftElement);
scrollPane.setCorner(JScrollPane.UPPER_RIGHT_CORNER, topRightElement);Greets
Christian

Similar Messages

  • Issue with Multithreading and vertical scroll bar - help needed to debug!!!

    I have been working on a desktop Visual Studio 2010 application for quite a few years. It is written in C++ and MFC. This code is a combination of code I have written and code I inherited. It worked great for years on Windows XP, but when I ported
    it to Windows 7, a tricky problem has come up that I am having the darnest time trying to figure out
    In summary, it is a single .exe desktop application. There is the main thread (thread A), which launches another thread (thread B). Both threads share a pointer to a single window object which displays events. This window also implements a vertical and horizontal
    scroll bar. 
    The interaction and message processing between the threads seems a little sticky to me. Both threads A and B call the same member function of the CWnd object. BUT, Thread B ALSO posts messages to thread A's queue.
    So, in thread B, you will see code like this, which makes a direct call to the output window object, AND THEN it also posts a message to Thread A's mainframe window like this...
    if( m_pEventLog )
    pOutputWindow->AddLine("Some test...");
    if( m_phNotifyWnd[RECEIVE] && m_puiEventWMsg[RECEIVE] ) {
    ::PostMessage( m_phNotifyWnd[RECEIVE], m_puiEventWMsg[RECEIVE], 0, (LPARAM) pPkt );
    WHEN thread A receives the message that thread B posted above, it only does the following:
    LRESULT CMainFrame::OnSocketReceive( WPARAM, LPARAM lParam )
    CSPkt* pPkt;
    CRWPkt* pRWPkt;
    CSPktSocket* pSocket;
    ULONG ulType;
    CString csTemp;
    CBSWords bsWords;
    CSSSWords sssWords;
    CRWPkt* pLoopBackRWMsg; // used if we have to send a loopback msg back to sender
    CLMsg lmsg;
    m_wndTextWindow.AddLine("Test message");
    return 0;
    So both threads are writing to the output window via the .AddLine() member function.
    void COutputWnd::AddLine( CString& strLine, COLORREF crColor )
    UpdateVScroll();
    return;
    And this function then makes a call to :UpdateVScroll().  The problem seems to arise because thread B does a
    post to thread A, where thread A in turn writes to the output window. Eventually, the program
    HANGS in the call to
    SetScrollInfo() below...
    void COutputWnd::UpdateVScroll()
    CSingleLock lock( &m_CSVertScrollLock ); // lock things up while we are in here
    BOOL bok = lock.Lock();
    if (lock.IsLocked() == TRUE)
    int iMax = m_FifoIndices.GetHighestIndex();
    if( iMax < ( m_iMaxViewableLines - 1 ) )
    iMax = 0;
    //SetScrollRange( SB_VERT, 0, iMax, FALSE );
    //SetScrollRange( SB_VERT, 0, 9, FALSE );
    SCROLLINFO scrollinfo;
    scrollinfo.cbSize = sizeof(SCROLLINFO);
    scrollinfo.fMask = SIF_RANGE;
    scrollinfo.nMin=0;
    scrollinfo.nMax= iMax;
    SetScrollInfo(SB_VERT, &scrollinfo, FALSE);
    lock.Unlock();
    It doesn't take long for the program to hang...maybe about 10 seconds. 
    When I hit DEBUG->BREAK ALL, I get the output below in the CALL STACK WINDOW.
    ntdll.dll!770070f4()
    [Frames below may be incorrect and/or missing, no symbols loaded for ntdll.dll]
    user32.dll!76c0cde0()
    user32.dll!76c018d9()
    >
    mfc100d.dll!AfxInternalPumpMessage()  Line 153 + 0x13 bytes
    C++
    mfc100d.dll!CWinThread::PumpMessage()  Line 900
    C++
    mfc100d.dll!CWinThread::Run()  Line 629 + 0xd bytes
    C++
    mfc100d.dll!_AfxThreadEntry(void * pParam=0x0022f6a4)  Line 122 + 0x13 bytes
    C++
    msvcr100d.dll!_callthreadstartex()  Line 314 + 0xf bytes
    C
    msvcr100d.dll!_threadstartex(void * ptd=0x004f97c0)  Line 297
    C
    kernel32.dll!762cee1c()
    ntdll.dll!770237eb()
    ntdll.dll!770237be()
    NOTE: If I never make the call to SetScrollInfo(), the program never HANGS.
    Sooo....I am trying to determine if there is a fundamental issue with the way the threads are communicating that is causing the issue, or if maybe I have a memory overwrite. It always hangs in ::SetScrollInfo(), no matter what I comment and uncomment. This
    makes me think that scroll bat behavior is different in Windows 7 than on XP, but I have not been able to find any documentation about it. 
    Can anyone provide any insight as to what may be the cause of the program hanging>

    It might look like working but it will crash eventually. The windows are thread affine and other thread must never touch other threads windows. Sometimes you might get along but usually it just crashes.
    Thread B must use PostMessage ( or SendMessage if suncronous action is require) to thread A's windows to achieve correct updating. Some very basic calls are implemented directly with SendMessage so they are safe to use but then you must individually check
    which ones are safe.
    Also having multiple SendMessage calls from B to A require rendezvous which might cause other problems ( thread B stalls or program deadlocks, depending on other program structure).
    So PostMessage is the way to do it ( or create yourself another inter-thread mechanism, possible but usually too much troble)

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

  • How to fix double vertical scroll bar in responsive output

    After implementing the solution provided for the question 'Responsive HTML5 Output: How to auto adjust the screen resolution for all devices?', the function bar in output does not appear and also another vertical scroll bar in the output. I edited the max-width value in the layoutfix.min.css file and fixed the function bar issue. How can I do away with the additional vertical scroll bar?

    I've looked into the issue.
    @Delennish: In your case, the size of the iframe is too large, or you have an extra empty element below the iframe. You can try 2 things:
    1. Best solution but may have side effects: In the main.css, add the following code:
    div.contentholder { overflow: hidden !important;}
    For this option, please check for undesired side effects.
    2. Works, but is ugly: In the main.css, add the following code:
    div.floatholder iframe.wTopic { height: 95% !important;}
    Try playing with the height setting until the 2nd scrollbar disappears.
    @CarolW: The layout you're using is very old. I've made a new responsive layout with TOC only. Please use that one instead: http://www.wvanweelden.eu/sites/default/files/attachments/Theme1_Standard_TOC_Only.zip (I'll update my site with this new version later.)

  • TileList does not recognize the size of vertical Scroll Bar

    Hi,
          I have a tileList with a custom vertical scroll bar that I made, the problem is that when the tilelist gets filled, it does not recognize that the vertical scroll bar width is not the default 16 pixels (I think the default value it's 16, but I'm not really sure) but 5 or 6 pixels, so the first time it gets filled it shows 3 columns of items (no problems with the rows). The columnWidth is set to 185, if I lower it to 180, it shows the 4 columns that I want it to show (instead of 3). I know that there is enough space because when I scroll down, and then scroll up, the fourth column appears. That's why I think that the TileList is not recognizing that the width of the vertical scroll Bar is less than the default width.
    Does anybody know how to make it recognize the new width? And how is  it that it has to take a scroll down to get it to recognize it.
    Thank you for your help.
    Sebasti'an Toro O.

    Yeah, you can try signing up for DropBox - it's a free service that allows you to sync any files between your iPhone and your computer.  More info here:  http://www.dropbox.com/about

  • How to make HTMLPANEL have a vertical scroll bar?

    The content that I load into the panel is longer than the panel itself. How do I make the
    panel have a vertical scroll bar to contain all the data within it.

    Add
    overflow: auto;
    or
    overflow: scroll;
    to your style definition of the panel. You can also use
    overflow-y: auto;
    or
    overflow-y: scroll;
    which gives only a vertical scroll bar.
    Beth

  • Electronic noise is emitted from my computer when manually dragging the vertical scroll bar with hardware accleration enabled, but no noise is emitted when scrolling any other way (ie hyperscroll via mouse wheel).

    [Firefox 4.0]
    When I use my mouse button to hold and drag the vertical scrolling bar, my computer emits a soft grainy sound. However, when I hyper scroll with my mouse wheel, there is no noise.
    I do not get the quiet noise with Internet Explorer. I did not get this with previous versions of Firefox.
    Turning hardware acceleration off resolved this.
    I'm running Windows 7 with a dedicated graphics card (GTX 285).

    Quote
    amd 64=12a @12V
    ati 9800=7.5~10.5a @12V (assuming 90~125 watts) a max load,
    a 9600 ir nvida 5200 used far less power
    so your already at 18a with no fan,s no hd, no cd,no dvd ,no mobo chipset , no mem, no sound..etc
    If you exclude the motherboard, memory, etc like you did there, the amd 64 draws 7.2A @ 12V.
    90~125W for an ATI 9800?! [irony]Are you working for a PSU manufacturer or what?[/irony] That's just absurd.  
    Go read this post to get a feel for the actual power consumption: https://forum-en.msi.com/index.php?postid=297061&sid=#post297061

  • Missing VERTICAL SCROLL-BAR only in the TV Shows tab.

    *I keep losing my vertical scroll-bar while looking at Television shows.* I believe this might be related to the Windows Vista 64-Bit platform.
    What-ever it is, this problem has been occurring since iTunes version 9.x for sure. I am *currently on iTunes version 10.0.0.68* with the same annoying "find the vertical scroll-bar" problem. I have reported my concerns to Apple, but their has never been a reply and the problem has +migrated beyond iTunes 9.x now.+
    The following are all examples of how or when...
    1. enter the "TV Shows" tab for the first time since I started iTunes.
    ( as in today, last hour, or just xx minutes ago. )
    ( of course just closing iTunes and restarting iTunes )
    ( has not constant result. )
    2. just got done watching a television episode in a separate window.
    3. just got done watching a television episode in the same or list window.
    4. switched from one view style to another view style.
    5. enter the "TV Shows" tab from another tab such as "Music" or "Podcasts".
    The only way to get the scroll-bar back is to switch to another tab and then switch back to "TV Shows". This sometimes takes 5 to 6 switches before the scroll-bar returns. And of course, it might disappear again if any of the above 1-5 examples occur.
    I do have a couple of screenshots for anyone to view, not sure how to post it as part of this post. If you desire, request the screenshots and I will e-mail them to you for your reference.

    I also have this issue with the scroll bar in Mail since upgrading from Leopard to Snow Leopard. I Google it... and that is what brought me here, so hopefully someone knows what is going on as I was kind of hoping that 10.6.1 would have fixed this.

  • Help with a vertical scroll bar issue with a List component

    hi. i have a basic <s:list> that uses an XMLListCollection as it's data provider and a very basic itemrenderer. when a row in the list is clicked a function gets the list.selectedIndex then populates some text fields with more xml data. that all works fine.. the problem i have is that the vertical scroll bar on the list seems to be "clickable" - just like a row in the list. the scroll bar scrolls normally but when it's clicked the selectedIndex becomes -1 which is not helpful b/c the value -1 is passed to the XMLListCollection.
    any ideas? cheers.

    thanks but still problematic...surely the <s:List> component shouldn't return a value when the scrollbar thumb is clicked? i created a very basic list (see below) and made the list dimensions short enough so that there is a vertical scrollbar and found that when the scrollbar thumb is clicked the trace(event.currentTarget.selectedIndex) returns a number. that's annoying b/c i just want a selectedIndex value for a row that is clicked not the scrollbar.
    any ideas to get around? cheers
    <fx:Script>
    <![CDATA[
    protected function list1_clickHandler(event:MouseEvent):void
    trace(event.currentTarget.selectedIndex);
    ]]>
    </fx:Script>
    <s:List x="162" click="list1_clickHandler(event)" y="276" labelField="@label" width="144" height="153">
    <s:dataProvider>
    <s:XMLListCollection>
    <fx:XMLList xmlns="">
    <node label="one"/>
    <node label="two"/>
    <node label="three"/>
    <node label="four"/>
    <node label="five"/>
    <node label="six"/>
    <node label="seven"/>
    <node label="eight"/>
    <node label="nine"/>
    <node label="ten"/>
    <node label="eleven"/>
    </fx:XMLList>
    </s:XMLListCollection>
    </s:dataProvider>
    </s:List>

  • 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

  • Why is there a vertical scroll bar with short page export from FW CS4?

    When I view my exported page that is 400 pixels tall, I see a vertical scroll bar on the right of my IE7 browser even though the page is no where near the bottom of the browser.  How do I eliminate that scroll bar?

    Unfortunately this is not working in IE7.  Below is my body tag (I edited the SLICES.XTT to prevent the margins) where I've added the overflow option:
    body </style>
    But I still see the vertical scroll bar with a 400 px image exported as html, see attachments.

  • Why are vertical scroll bars disapearing with safari

    I have no vertical scroll bar when I access certain websites through safari, but they are there if I use firefox...

    Open the Finder.
    From the Finder menu bar click Go > Go to Folder
    Type or copy / paste:    ~/LIbrary/Caches/com.apple.Safari
    Click Go the move the ApplicationCache.db (or Cache.db) file from the com.apple.Safari folder to the Trash.
    Quit and relaunch Safari to test.

  • 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.)

  • At times when dragging the vertical scroll bar my computer screen oscillates up and down for some time before going blank or not responding to any clicks requiring a forced system restart. What is wrong?

    Hi,
    Suddenly while working with Firefox if I happen to drag the vertical scroll bar, a very abnormal behavior occurs. My screen dances up and down for a short time before either going black or getting restored but with no clicks working. The only way to resume is to force a restart of the system.
    Any help would be deeply appreciated.
    Thanks and Regards
    Deepak

    That didn't work. On trying to install a new driver I got the error the graphics driver could not find compatible graphics hardware. Is there anything else that can be done to at least prevent the hanging of the computer even if it means less features from Firefox being available?

  • Remove vertical scroll bar from table control

    hi,
    i had used table control in my application. i want remove vertical scroll bar from table control.
    At initial time in table control there is no vertical scroll bar. In my table control lines are dependent on internal table which i was used to fill it.
    i was used these code for to set table control lines.
    DESCRIBE TABLE IT_RISK_ZINRISEXC LINES EXC_LINE.
    TC_RISK_EX-LINES =   EXC_LINE .
    Initially there is no data in internal table so there is no vertical scroll bar. After getting value i am filling internal table. and there is scroll bar in my table control. but i does not want that.
    i was not selected RESIZING-VERTICAL OR -HORIZONTAL.

    Hi,
    From Scroll Bars in Table Control
    You can remove the scroll bar in the table control by switching off horizontal and vertical scrolling in the properties of the table control. The properties can be accessed from the screen painter by double clicking on the table control. Regarding the page up and page down functions, I believe you add those buttons in the screen layout and code for them. You can use the standard function code for the page up and page down functions.
    or
    You can get rid of the vertical scroll bars by not setting table control lines. This way the user can only see the visible lines of the table control. As for the horizontal scrollbar, just make sure that your table control doesn't contain too many fields.
    Regards,
    Raj.

Maybe you are looking for