Horizontal scrollbar for JComboBox

Hi,
I want to use Horizontal scrollbar for JComboBox which i have used as an editor for table column cell and the matter in drop down list is larger but the width of column of a table is relatively small
Any suggetions!
Thanks and regards,
Nilesh

Hi,
I want to use Horizontal scrollbar for JComboBox which i have used as an editor for table column cell and the matter in drop down list is larger but the width of column of a table is relatively small
Any suggetions!
Thanks and regards,
Nilesh

Similar Messages

  • Horizontal scrollbar for JComboBox - Not workable under Mac

    By referring to this thread Re: Horizontal scrollbar for JComboBox across multiple look and feel I try to provide horizontal scroll bar for JComboBox to my clients.
    private void adjustScrollBar() {
        //if (this.getItemCount() == 0) return;
        Object comp = this.getUI().getAccessibleChild(this, 0);
        if (!(comp instanceof JPopupMenu)) {
            return;
        JPopupMenu popup = (JPopupMenu) comp;
        // Works fine under Windows and Ubuntu Linux
        // However, in OSX 10.6.4
        // javax.swing.Box$Filler cannot be cast to javax.swing.JScrollPane
        JScrollPane scrollPane = (JScrollPane) popup.getComponent(0);
        scrollPane.setHorizontalScrollBar(new JScrollBar(JScrollBar.HORIZONTAL));
        scrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
    }The above code will cause ClassException under OSX 10.6.4. (Works fine for Windows and Linux)
    Any suggestion to resolve this problem. Sorry. I do not have a Mac machine. Hence, can't experiment out much with it.
    Thanks

    The following code works quite well for me.
        private void adjustScrollBar() {
            final int max_search = 8;
            // i < max_search is just a safe guard when getAccessibleChildrenCount
            // returns an arbitary large number. 8 is magic number
            JPopupMenu popup = null;
            for (int i = 0, count = this.getUI().getAccessibleChildrenCount(this); i < count && i < max_search; i++) {
                Object o = this.getUI().getAccessibleChild(this, i);
                if (o instanceof JPopupMenu) {
                    popup = (JPopupMenu)o;
                    break;
            if (popup == null) {
                return;
            JScrollPane scrollPane = null;
            for (int i = 0, count = popup.getComponentCount(); i < count && i < max_search; i++) {
                Component c = popup.getComponent(i);
                if (c instanceof JScrollPane) {
                    scrollPane = (JScrollPane)c;
                    break;
            if (scrollPane == null) {
                return;
            scrollPane.setHorizontalScrollBar(new JScrollBar(JScrollBar.HORIZONTAL));
            scrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
        }

  • Apex 5.0, Horizontal scrollbar for Interactive Report  and Pivot Format

    Hi,
    i would like to know how to have an horizontal scrollbar for an interactive report (5.0) after making a pivot from the user interface; i have a lot of columns and without the pivot the horizontal scrollbar appears . After it doesn't appear.
    I tried with the Region Header <div style="overflow:auto;"> and Region Footer </div>  but without success.
    Regards
    Gianpaolo

    Hi gianpagi,
    gianpagi wrote:
    i would like to know how to have an horizontal scrollbar for an interactive report (5.0) after making a pivot from the user interface; i have a lot of columns and without the pivot the horizontal scrollbar appears . After it doesn't appear.
    I tried with the Region Header <div style="overflow:auto;"> and Region Footer </div>  but without success.
         Please mention the theme and template you are using for the Interactive Report.
         Can you re-produce the issue on apex.oracle.com and share the workspace credentials, so that can have closer look at the issue?
    Regards,
    Kiran

  • Horizontal scrollbar for plot legend

    Hello,
    The plots in my plot legend for a graph can have quite long names so it would be great having a horizontal scrollbar.
    Quote from here
    >>To add a scroll bar to a plot legend, right-click the plot legend and select Visible Items»Horizontal Scrollbar or Visible Items»Vertical Scrollbar from the shortcut menu.
    I can see the entry horizontal scrollbar, but it is always grayed out, what's wrong?
    Thanks a lot for your help!
    Cheers,
    Rico

    I think you are misinterpreting the use of the scrollbar.  If you have a lot of plots on your graph, then you can use the scrollabr to not show all the plots at once and this allows you to scroll through the list.  It does not allow you to make the plot legend smaller to hide long names and scoll across.
    So, if you resize the plot to be horizontal, then you can display the horizontal scrollbar:
    If you resize it vertically, then you can display the vertical scrollbar:
    Message Edited by Matthew Kelton on 05-09-2008 12:09 PM
    Attachments:
    Plot legend horizontal.png ‏2 KB
    Plot legend vertical.png ‏2 KB

  • Horizontal Scrollbar for af:selectOneListBox

    Hi
    Is there a way to fix the width of af:selectOneListbox such that for list values that are longer than stipulated width, a horizontal scrollbar can also be introduced to browse these values?
    I cannot pre-determine the longest item as values within af:selectOneListbox is loaded dynamically.
    Thanks a lot in advance!

    Hi,
    you can try CSS overflow:scroll to get a scrollbar. However, the width might be easier to set using CSS and can also be computed by a managed bean property
    http://www.w3schools.com/cssref/pr_pos_overflow.asp
    Frank

  • Need horizontal scrollbar for af:selectManyChoice

    Hi,
    I use JDeveloper Studio Edition Version 11.1.1.7.0
    There is a field for which we use af:selectManyChoice ADF component.
    The component is displaying the vertical scrollbar to show all the values automatically.
    And width wise the component is expanded to show values. But, its not expanded to show the value which has maximum value.
    Can we add a property to instruct the component to take the maximum width of the values in the list?
    Or can we add a horizontal scrollbar to the component?
    Attached the screenshot.
    Regards,
    Tamil

    Hi,
    you can try CSS overflow:scroll to get a scrollbar. However, the width might be easier to set using CSS and can also be computed by a managed bean property
    http://www.w3schools.com/cssref/pr_pos_overflow.asp
    Frank

  • Horizontal scrollbar for JTable

    Hi folks,
    I just created a JTable with 15 columns. As number of columns are more, I am not able to view all data. Probabaly I would need a Horizonatal scrollbar. I used setPreferredScrollableViewportSize(), but it doesn't help me. Can u pls any body help me to make it work out?
    Thanx in advance.
    Regards,
    Ayyappan.

    Hi chuanhaochiu,
    Thanx for immmediate reply. I have already put JTable in JScrollBar. I am comfortably getting the vertical scrollbars when more rows are added. I am not able to get only the horizontal bar.
    Ayyappan G.

  • Horizontal Scrollbar in a JTextPane

    How can I specify whether or not there is a horizontal scrollbar for a JTextPane? The JTextPane is held within a JScrollPane, but if I try and do:
    scrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);
    I just end up with a pointless scrollbar on the JScrollPane which doesn't do anything, because the text in the JTextPane still wraps onto the next line.
    Any ideas?
    Thank-you.

    Use this code to cancel the line wrapping of the text pane.
    JTextPane textPane = new JTextPane() {
        public boolean getScrollableTracksViewportWidth() {
            return false;
        public void setSize(Dimension d) {
            if (d.width < getParent().getSize().width)
                d.width = getParent().getSize().width;    
            super.setSize(d);
    };

  • How to render Inline scrollbars for a table

    Hi All,
    I'm using a large table with nearly 30 columns with the width property of the table set to 2200 and No wrap is set to TRUE on all the columns.
    Is there any possible way to render inline horizontal scrollbar for the table instead of rendering the scrollbars on an OAF page ?
    Please help me.
    Regards
    Srikanth Enuguru

    I cant help you with the Inline scroll bar you are looking for (dont think we have anything like this in OA Framework). But you can ponder over the idea of showing another region using hide/show feature. You can use this region to show all the additional information for which you need so many columns.
    Regards
    Sumit

  • How to create Horizontal scrollbar

    I am using Form6i, how to create a horizontal scrollbar for a multi-record block?
    Thanks!

    A horizontal scroll bar is not an object that you can drag or resize like a vertical scrollbar. It is implicitly created when needed.
    To get a horizontal scroll bar, you have to place the items you want to scroll on a STACKED CANVAS and set property Show Horizontal Scroll Bar of this canvas to Yes.

  • Slow Swipe experience for Horizontal Scrollbar, in iphone & ipad

    Hi All,
    I put images in a DIV and enabled the Horizontal Scrollbar. The swipe action is too slow/short in iphone and ipad. I was expecting the device to translate scrollbar into a natural swipe behavior. By natural swipe behavior I mean the same sort of swipe experience you get when you scroll a web page vertically on iphone.
    Link to website: www.fieldrecording.info
    The experience is the same for both Chrome & Safari on iPhone. Below is the code related to the main div wrapping all images:
    sym.$("Group").css({ width:$(window).width(), overflow:"auto", overflowY: "hidden", })
    I found some tutorials on Jquery & CSS tricks, but I would like to know if Edge has some built in solutions to solve Swipe/Scroll interactions in a single attempt.
    http://css-tricks.com/the-javascript-behind-touch-friendly-sliders/

    Hi,
    Below link may helpful for you.
    ADF Table Horizontal Scrollbar

  • Combo box menu calculation of popup size ignores horizontal scrollbar

    I have a JComboBox that I've setMaximumRowCount(20). However, sometimes the combo box has as few as 2 or 3 items in it. In those cases as you probably know, Swing automatically calculates how tall the popup should be, in this case 2 rows tall.
    However, this calculation ignores the horizontal scrollbar, which basically occupies a "row" itself. This means that if I have combo box with 2 items, the displayed popup will contain the first item, a horizontal scrollbar, and a vertical scrollbar (for scrolling down to the item that the horizontal scrollbar hides) . Is this a bug in Java? If so, are there any workarounds to this?
    I've looked in the bug report section using the terms "combobox horizontal scrollbar popup" and couldn't find anything
    thanks

    the very simple strategy to do is to call removeAllItems() method for the 2nd combox box and then insert the contents. this is because the validate() method is not repeatedly called and so the contents are not updated immediately.

  • To disable the horizontal scrollbar and to create a next button to navigate

    To disable the horizontal scrollbar and to create a next button to navigate through the records. At present I create a JSF page and drag and drop my table view and then using the Tuning property I have limited the number of records to be shown. But I need to add a button and then code it to display the next few records. Can someone kindly suggest a suitable mechanism to get this accomplished.
    Edited by: 888970 on Oct 2, 2011 10:15 PM

    Hi Erp,
    At present these are the entries that I have in my JSPX page.
    I have a Table, Iterator and a Input List of Values. As per the scenario, I want a few rows to appear on the table for which I wanted to disable the horizontal scroll bar and then once I click on the list of values it must prompt me with the remaining page numbers.
    Earlier there are about 150 records in the table. I want to show them as 15 per page.
    For which I have added the Iterator and a LOV component code in my JSPX page.
    <af:iterator id="i1"
    value="#{bindings.NsEventDetailsView1.collectionModel}"
    var="row"
    binding="#{pageFlowScope.testPageBean.myIterator}"/>
    <af:inputListOfValues label="Label 1"
    popupTitle="Search and Result Dialog" id="ilov1"/>
    Then I created the bean class as per the example.
    Below is the bean class:
    import javax.faces.event.ValueChangeEvent;
    import oracle.adf.view.rich.context.AdfFacesContext;
    import org.apache.myfaces.trinidad.component.UIXIterator;
    import org.apache.myfaces.trinidad.event.AttributeChangeEvent;
    public class TestPagebean {
    public TestPagebean() {
    public void i1ov1_valueChangeListener(ValueChangeEvent valueChangeEvent) {
    // Add event code here...
    private UIXIterator myiter;
    public void setI1(UIXIterator myiter) {
    this.myiter=myiter;
    public UIXIterator getmyiter() {
    this.myiter=myiter;
    public UIXIterator setmyiter() {
    return myiter;
    UIXIterator valueIterator = getmyiter();
    if (!valueChangeEvent.getNewValue().equals(valueChangeEvent.getOldValue())) {
    int newPage =
    Integer.parseInt(valueChangeEvent.getNewValue().toString());
    int pageStart = (newPage) * valueIterator.getRows();
    valueIterator.setFirst(pageStart);
    AdfFacesContext.getCurrentInstance().addPartialTarget(valueIterator);
    But i am getting errors in the bean class.
    1. Block expecting }
    2. public UIXIterator getmyiter() {
    this.myiter=myiter;
    Return Statement missing
    3. Block expecting {
    4. Type or variable 'valueChangeEvent' not found
    5. Method 'getNewValue' not found
    6. Method 'getOldValue' not found
    7. Method 'toString' not found
    Can you suggest a possible solution?

  • Forms 5 Tab Canvas & Horizontal Scrollbar

    We are trying to implement a tab canvas which will hold a multi-record data block. The difficulty is that we would like to display a lot of fields and there is no Horizontal Scrollbar easily available for the Tab Canvas.
    We are thinking about "simulating" a tab canvas by using stacked canvases. The stacked canvas allows us to have the scrollbar, but looses some of the look & feel of a tab canvas.
    Anyone try to do this in Forms 5? How about anyone try to place a stacked canvas on top of a tab canvas?

    We're using forms 6.0.8.8. Our standard practice is to never put items on a tab canvas, instead we put stacked canvas' on the tab canvas. Besides having canvas scroll bars, it also provides a basis to work around documented bugs for refreshing/resizing windows when returning from other forms/windows of different sizes etc.
    null

  • Browser scrollbar for Flash movie?

    The webpage for my Flash movie does not have scrollbars. On
    most of the frames (I did each site page as a named frame in a
    single timeline) it doesn't matter, but there is one frame where
    the content stretches the full 900 px tall and you can not scroll
    down.
    I'm afraid I also have complicated things because the client
    said he wanted everything, the whole site, 10% bigger... so I set
    the movie width and height as 110% in the HTML. (Suggestions on
    this are appreciated, too!)
    I'm worried that if I somehow add scrollbars, it will want to
    add a horizontal scrollbar to the bottom too.
    I was wondering if I could add a Flash scrollbar (if it
    worked with scrolling mice, that would be bonus) just on that page,
    and have it appear exactly at the right edge of the browser window
    and smartly sense how tall to be. Would I have to load it as a
    separate movie? Any suggestions are ever so much appreciated!

    Nevermind... I found out his Flash Player was WIN 9,0,47,0
    while everyone else is WIN 9,0,124,0 . He upgraded & it is
    working.

Maybe you are looking for

  • NI-DAQmx Run-time Engine

    Is a run-time version of the NI-DAQmx v8.6 driver available yet? I'm distributing an application from LV 7.1 that requires DAQmx and want to include this as part of the installation. I found run-time packages for v8.3 but I'm using v8.6 in my develop

  • IDOC_AAE sender channel shows Commit fault: ASJ:ejb 005043 [Failed in component error]

    Hello All. We have a scenario IDOC to JDBC [ async-sync] scenario. And we have used Async/sync bridge using request response bean module. Now the issue is that when IDOC is triggered from ECC it shows Commit fault:ASJ:ejb 005043[failed in component]

  • Podcasts are no longer being automatically updated after hibernation mode

    Heeello to you all! I noticed that after going to hibernation mode (the motherboards suspend to disk functionality) the schedule for my podcast updates is messed up. For example now is Feb 22nd 2007, 21.14 and my iTunes says that it wants to search f

  • IR and ID opening in German, instead of English

    Dear all, We have a XI server. When i open the IR and ID. The whole content of IR and ID is getting displayed in German. Even RWB Tab descriptions are in German. Checks done - Logon language set for my Userid - English                          In Exc

  • Iphoto keeps shutting down after upgrade on my iMac

    I recently upgraded my iphoto and now ever time I load pictures or even try to edit pictures it shuts down.