How to make JList scrollable left right?

Hi,
How to make JList scrollable left right?
Ty.

jList MyList = new JList();
JScrollPane  sp = new JScrollPane(MyJList,JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);then the horizontal (and vertical if its the case) scrollbar will show up
hope this helps

Similar Messages

  • How to make HtmlSelectManyCheckBox scrollable

    Hi,
    I have a requirement like , have to create the checkbox list dynamically.
    I am doing it through the binding. But i want to make the HtmlSelectManyCheckBox should be scrollable.
    I am doing as belwo
    HtmlPanelGrid innerGrid = new HtmlPanelGrid();
                   innerGrid.setWidth("150%");     
                   innerGrid.setStyle("height:150px; border:2px; overflow-x: scroll; overflow-y: scroll;");
    HtmlSelectManyCheckbox selectBox = new HtmlSelectManyCheckbox();
                   selectBox.setBorder(3);
                   selectBox.setLayout("pageDirection");
                   selectBox.setStyleClass("selectManyCheckbox");
                   selectBox.setTitle(catVO.getCatName());
                   // adding the selectitems to select many list box
                   UISelectItems items = new UISelectItems();
                   items.setValue(catVO.getInterestItems());               
                   selectBox.getChildren().add(items);
    innerGrid.getChildren.add(selectBox);Though i set the style of the grid to be scrollable , but its not working properly.
    Plz help me , how to make it scrollable.

    hari_honey wrote:
    Thank u , ok how to apply the styles or style class to the HtmlPanelGroup.Uh, just the same way.
    And i have to create the lists dynamically , and i dont have the count of the number of panelGroups.You already have the count of checkboxes.
    How can i put them in table.The same way.

  • How to make chart scrollable?

    Hi everybody,
    I want to ask how to make a chart become scrollable (just like a chart with a scroll bar that help us see all content in this chart when this content become to large).
    Because my line chart adding series data based on real time, so the content change dynamically. And when the content change, I don't want the axis change its size to fit the chart size, because it make the line chart smaller and narrow.
    I have seen in JavaFx Ensemble the example *"Advanced Stock Line Chart Sample"*, it seem like what I looking for. But this chart clear the old data after a period. I want chart to keep the old data and when I want to review, just scroll back
    Can anyone give me suggestion?

    Have you looked at ScrollPane.... http://docs.oracle.com/javafx/2/api/javafx/scene/control/ScrollPane.html
    You can just throw your chart in there. Then if your chart gets bigger then the screens dimensions the ScrollPane will become scrollable.

  • DateChooser.. how to custom events on left/right arrow that switch the months?

    Hi,
    In the DateChooser there are left/right arrows to switch the
    prev/next months, is there anyway that i can customize the events?
    like overriding or something?
    any help is really appreciated!!

    You can always copy the SDk source to your project, change
    the package name, and do whatever you want. I had to do this to
    make the background of the date chooser truly transparent.

  • How to make JFrame scrollable?

    How can I make a JFrame scrollable? So that when I resize the JFrame to a smaller size the contents remain accessible? The way it is now is that when I resize a JFrame I can't access the components that fall out of the window (I'm using absolute component positioning within the JFrame). I thought adding two scrollbars to take care of this would be easy, but so far I haven't been able to get it right. Any suggestions would be appreciated.

    Why dont you put all your components in a JPanel, add a scrollpane to it and then add that JPanel to
    ur JFrame.
    += KRR

  • How to make a scrollable applet

    How do I make an applet scroallable? Not a scrollpane within an applet but instead make the whole contentpane for the applet as a scrollable pane if the content within the applet�s contentpane is too small to view all the added content. Or if the applet is added to a frame to be run as an application and the frame size is decreased.
    That is, how do I make a scrollpane that fills the whole contentpane for the applet and is resized together with the applet�s contentpane? What do I for example have to add to this little applet to make it�s contentpane scrollable?
    public class Applet extends javax.swing.JApplet
        public void init()
            // Initialization of the applet pane
            getContentPane().setBackground(java.awt.Color.WHITE);
            getContentPane().setLayout(null);
            // Adds some content
            JLabel label = new JLabel("Applet application");
            label.setSize(100, 20);
            label.setLocation(10, 10);
            getContentPane().add(label);
    }It is probably very easy but I can�t figure it out myself yet, I am still too new to Swing : )

    Thank you for your answer, but I am not quite happy yet ...
    What is it so bad with use of null-layout? I have found that I can use exact positioning using setLocation if I set use null-layout which I can�t with for example BorderLayout. It is even worse, the BorderLayout makes the UI ugly by size of the content to fill one out of five "cells". But I know I am wrong when I say nul-layout is fine because many other also complains on null-layout, I just don�t know why I am wrong?
    But any way, with null-layout, something like this ...
           JPanel contentPane = new JPanel(new java.awt.BorderLayout());
           getContentPane().add(new JScrollPane(contentPane));
           JScrollPane scrollpane = new JScrollPane();
           scrollpane.getViewport().add(getContentPane());
           // Initialization of the applet pane
           contentPane.setBackground(java.awt.Color.WHITE);
           contentPane.setLayout(null);
           contentPane.add(table);do I just get a white empty area. If I instead use a BorderLayout like in your example do the table fill the whole space, and that does not look too beautiful. Couldn�t I instead get a pane with some absolute positioned elements that has some space around them scrollable?
    I guess I am on the wrong direction now : ) but I then need someone to teach me why?

  • How to make JList Editable

    How can i enter things in the JList? Is that possible be done? Pls advice.

    Its right, JList is not editable but You can catch events
    I for example use this
    public void jList1_KeyPressed(java.awt.event.KeyEvent keyEvent) {
         if (keyEvent.getKeyCode() == keyEvent.VK_ENTER) {
              selectDetailWindows(ivjJList1.getSelectedIndex());
         return;
    }where selectDetailWindows knows the Listindex, get data edit them and writes them back.
    Hop this helps
    Hanns

  • How to align text {center/left/right} in  the column of ALV grid

    Hai all,
    I am displaying one check box in the ALV grid, but default it is coming left align in the column,
    how can i assign it to the center of the column.
    Thanks,
    SREEVATHSAVA.G
    Edited by: SREE on Aug 14, 2009 7:53 AM

    Hi,
    DATA:
      lr_model type ref to cl_salv_wd_config_table,
      lr_col type ref to cl_salv_wd_column.
    lr_col = lr_model->if_salv_wd_column_settings->get_column( 'EMPID' ).
    lr_col->SET_H_ALIGN(value = CL_WD_TABLE_COLUMN=>E_H_ALIGN- CENTER).
          AUTO TYPE WDY_UIE_LIBRARY_ENUM_TYPE VALUE '00', " TableColumnHAlign.auto
          CENTER TYPE WDY_UIE_LIBRARY_ENUM_TYPE VALUE '01', " TableColumnHAlign.center
          FORCED_LEFT TYPE WDY_UIE_LIBRARY_ENUM_TYPE VALUE '04', " TableColumnHAlign.forcedLeft
          END_OF_LINE TYPE WDY_UIE_LIBRARY_ENUM_TYPE VALUE '05', " TableColumnHAlign.endOfLine
          FORCED_RIGHT TYPE WDY_UIE_LIBRARY_ENUM_TYPE VALUE '06', " TableColumnHAlign.forcedRight
          BEGIN_OF_LINE TYPE WDY_UIE_LIBRARY_ENUM_TYPE VALUE '07', " TableColumnHAlign.beginOfLine
    Regards,
    Lekha.

  • How to make videos automatically play right after each other?

    I have four videos that I need to automatically play right after each other. For instance video1 plays and is done so video 2 should automatically start to play and then when video 2 is done video 3 should start and when video 3 is done video 4 should start and when video 4 is done video 1 should start. How do you code for this? Also, when a button is clicked whatever video is playing needs to stop and then the item that the button is linked to should show up whether it is another video or a graphic with scrolling text.

    How do you use a complete listener? Can you give me an example of code to use or give me a link that has step-by-step instructions? I really would appreciate it.

  • How to make a SCROLLABLE Table in ADF Faces ?

    Hi All,
    I want to make my ADF Table Scrollable (both Horizontally & vertically). It means when I have 30 rows on the table, I can make it only display 10 rows visible, then scroll it vertically.
    Also If I have wide tables(many columns) I can scroll it horizontally.
    Is it possible with ADF Faces ?
    (I look at FrameBorderLayout, but it seems not be able to do that )
    Thank you,
    xtanto

    Hi,
    What about the Horizontal scrolling ?
    for exampe :
    I have about 15 columns, the full page width can only shows 10, so I need to scroll horizontally, But I don't want to scroll the page, only the table.
    Is there any ADF Faces components for this ?
    or any commercial JSF components ?
    Thank you,
    xtanto

  • How can I create different left/right page numbers?  I am putting together a book for publishing on Amazon ... I need to submit a .pdf file.

    I am putting together a book of drawings for self-publishing on Amazon.  I want to add page numbers, but I want the place the page number on the right side of odd-numbered pages and on the left side of even-numbered pages.  Is there a way to do this in Pages?

    What version of Pages on what version of OSX?
    Pages 5.2 has no facing pages.
    In Pages '09, Facing Pages is in the Document Inspector.
    Peter

  • How to make JScrollPane scrollable only in the y- direction

    Hai,
    can some one help me fix this one. I need to create a JScrollPane which is scrollable only in the y direction.

    Hi everyone,
    Create the JScrollPane in this way
    JScrollPane ScrollPane1 = new ScrollPane(JComponent,
    VERTICAL_SCROLLBAR_ALWAYS,
    HORIZONTAL_SCROLLBAR_NEVER);Richard West

  • How to make output number left align?

    The output I made is like this
    http://www.imagestation.com/picture/sraid89/pfe13b569bfadfac19a8cf7f63ad4c02e/fa889fff.jpg
    but what i want is all numbers left align like this
    http://www.imagestation.com/picture/sraid89/pe8f67975a1168ba7e94c0cc2775ad61e/fa889ca6.jpg
    Any idea or hint? Thanks a lot!

    Try this
    class LeftAlign
      public LeftAlign()
        int[][] arr = new int[20][15];
        for(int x = 0; x < arr.length; x++)
          for(int y = 0; y < arr[x].length; y++)
            arr[x][y] = x*arr[x].length + y + 1;
        String pad = "   ";
        for(int x = 0; x < arr.length; x++)
          System.out.print(arr[x][0]+" ");
          for(int y = 1; y < arr[x].length; y++)
            System.out.print((pad+arr[x][y]).substring((""+arr[x][y-1]).length())+" ");
          System.out.println();
        System.exit(0);
      public static void main(String[] args){new LeftAlign();}
    }

  • How to make JMenu scrollable

    What to do if I have too many items in my Menu?
    Can I implement somthing similar scrolling and how?

    see http://forum.java.sun.com/thread.jsp?forum=57&thread=483165
    ;o)
    V.V.

  • Know how there's two timers (left, right)? the right one doesn't run

    Normally there are two timers next to the current song status: 1) how much time since the beginning of the song, and 2) how much time until the end. For some reason, the second one doesn't work and all it displays is the total length of the current song. It's not something that can be fixed by restarting the computer (so far this is apparent) because I noticed this yesterday and I turned the computer off for the night. I checked to see if there was an update for iTunes, hoping that the problem would go away after downloading a new version, but I already have the current one. Any suggestions?

    Start playing a song, and click on the second counter (the one that is displaying just the length of the song). This should toggle it back.
    CG

Maybe you are looking for