Adding scroll bars to jlabel

hi i'm new so be easy on me please... i am trying to figure out how to add vertical and horizontal scroll bars to my jlabel. I am using sun one studio 5 on this project which allows me to manually place vertical and horizontal toolbars but when i do that they don't work w/ the image that i'm trying to scroll...i know that i have to code so that the scroll bars know to function w/ the jlabel but thats all i know. please advise~ thanks

well, I don't know about doing things with Sun One Studio, but....
Generally, if you want to scroll something, you would create a JScrollPane instance and add a component to it's viewport. That component could be a JLabel, so you wouldn't be scrolling the label so much as scrolling the pane. The effect would probably be same thing you are trying to see.
You can use scrollbars in your own component, but the main reason not to do that is that managing the scrollbar states and dealing with paging and whatever is just a pain.

Similar Messages

  • Adding scroll bar to a text box

    Is there a way to add a scroll bar to a text box? I am designing a website using ID (in the web view) which I am then giving to a web person to implement. I have one page that is longer than the others, where I would like to be able to scroll the text. I would really appreciate a step by step instruction on how to add a scroll bar to this text box.
    Thank you so much.

    The point is that exporting to Flash makes creating the webpage in ID seamless.  I am not familiar with a
    way to import an ID file into a Dreamweaver HTML.  ID relies on pages that get converted to
    frames on the Flash timeline which makes switching between pages, if you know enough ActionScript, a breeze.
    However I did find this link which outlines some compatibility between ID and DW:
    http://livedocs.adobe.com/en_US/InDesign/5.0/help.html?content=WS82C401A9-E844-40d5-B9B4-5 40CA374B0C6.html
    Message was edited by: markerline

  • Adding scroll bars to a frame

    Hi, I have a frame that pops out from my applet, and I want to add scroll bars to this frame. Using JScrollPane does not work. The scrollbars do not show up even when the image that is displayed on the frame does not fit in the current frame size. Is there a good way to do this? Thanks.

    Container c=getContentPane();
    c.setLayout(new FlowLayout());
    JScrollPane pane=new JScrollPane(your Component or frame);
    c.add(pane)

  • Adding Scroll Bar to a Frame

    Hi guys,
    Can anyone help me to add a scroll bar to a frame which contains a panel. The panel contains some Labels and one buttton.
    Please suggest it using java.awt package(not swings).

    But can you please tell me how to implement that.
    I am helpless. I can't find away out.Oh come on, look at the API docs. Put your Panel with the correct size into the ScrollPane, put the ScrollPane into the Frame, done.

  • Adding Scroll Bar in Jlist

    Hello
    Could anybody suggest me how can I add scroll bar in Jlist. I tried this one, but it did not work
    JList list = new JList(subject);
    JScrollPane scrollPane = new JScrollPane(list);
    Thanks
    Prashanth

    Posting another question without replying to the responses on your previous thread, are you? Good luck getting help with this one.
    db

  • Adding scroll bars to text

    I have a limited amount of space with a lot of text.  How do I limit the space by adding scroll bars

    Without using iFrames, you can do this pretty easily using CSS. Add the following to the css for your text container...
    .yourcontainer {
         height:300px;
         width:500px;
         overflow-y:auto;
         overflow-x:none;
    then in the html, add the class to your container...
    <div class="yourcontainer">All of your text here</div>
    In the above example, the container div will be 500 pixels wide and 300 tall with a scrollbar if the text cotent gets longer than the height of 300 pixels.

  • Adding Scroll bar InPanel Array

    I want to add scroll bar in panel array .Kindly help me to sort this problem immdiatedly

    Kindly help me to sort this problem immdiatedly Based on the information provided, I doubt we will be able to.
    The general advice is add your panel to the scrollPane and add the scrollPane to the GUI. Its that simple.
    If you need further help then you need to create a [url http://homepage1.nifty.com/algafield/sscce.html]Short, Self Contained, Compilable and Executable, Example Program that demonstrates the incorrect behaviour, because I can't guess exactly what you are doing based on the information provided.
    And don't forget to use the [url http://forum.java.sun.com/help.jspa?sec=formatting]Code Formatting Tags so the code retains its original formatting.

  • Where is the Scroll bar of the page?

    Hello,
    When I start doing my website on Flex 4 using flash builder eclipse plugin, and when I test my pages how they looks I can't see the scroll bar to to see the buttom of the page!! well I thought can be a bug or something but until now I still unable to see the buttom of the pages !
    I read this http://stackoverflow.com/questions/4627659/flex-4-scroller-skin, but I didn't understand what should I do exactely !
    should I create my scroll bar manually to be able to make a scroll ?
    Please I need a solution
    Anyone !

    see an example in action:
    http://trumpboston.com/helpothers/example03521/scroll.html
    it came from this example source code:
    http://blog.flexexamples.com/2010/11/03/adding-scroll-bars-to-an-spark-application-contain er-in-flex-4/
    the first module make it be your application mxml
    the second one, under your src directory, create a "skins" folder and save in there the file:
    skins/CustomScrollingApplicationSkin.mxml
    notice the slider on the top that will increase the height of your content to show the scrollbar jumping around in its height.

  • I'd like an alphabet scroll-bar for my folders in Mail. Will this be added anytime soon?

    I've been using Mail for years and find it convenient for use across all devices, off-and online. I really like that I can place a rule so that each email will automatically be delivered into individual folders. This makes it easy to organize my emails for search purposes, and to keep a clean and relevant Inbox. Sometimes, depending on my internet connection....it can sometimes cease at home and my desktop will be in sleep mode, and my emails won't be automatically ruled into their appropriate folders. This is ok, because I just manually file them. However, I have many folders. It would be an added bonus if there is an alphabet scroll-bar in the folders source list to the left of the Mail app. screen.
    It appears that so much time and energy has gone into renovating the Mail application throughout the years, and the clean design and ease of use is noticeable and appreciated. I feel they would be complemented by the scroll-bar.
    I'm just wondering if Apple has this in mind for any new updates to Mail?
    Thanks!

    Apple doesn’t routinely monitor the discussions.
    Send Apple feedback. They won't answer, but at least will know there is a problem. If enough people send feedback, it may get the problem solved sooner.
    Feedback

  • How to make the scroll bar in flex automate to focus on the new ui component added in the canvas?

    Hi all ,
    There is a canvas container where am adding charts in separate windows.
    So whenever a new chart is added the scroll bar needs to set the focus on the present chart window.
    For this i made the functionality for the canvas container to scroll whenever a new chart is added using the below code
    canvasContainer.verticalScrollPosition = canvasContainer.maxVerticalScrollPosition;
    But the calculations for the vertical position are not precise...
    Is there anything else I should do to make the scroll happen automatically as the chart windows get added in the container ??
    Any suggestions pls
    Regards,
    Ajantha

    Many many thanks to Frank,
    In the css,use the follwing style settings to hide the scroll bar
    af|carousel::spin-bar{    
    visibility: hidden;
    af|carousel::spin-h-previous-icon-style{
    visibility: hidden;
    af|carousel::spin-h-next-icon-style{
    visibility: hidden;
    af|carousel::spin-info{
    visibility: hidden;
    }

  • Adding a scroll bar

    Hello
    I have designed this website for my client... http://www.applebybowers.com/for_web/
    They wish to add a vertical scroll bar to the middle where the majority of text is so that more text can be added if necessary without the res of the page disappearing out of view on smaller monitors.
    Can anyone advise the best way to go about this.
    Thanks

    I'm not crazy about it either, but sometimes the client just won't change their mind no matter how much you try to persuade them!
    It's actually only on one page that I need the scroll bar - http://www.applebybowers.com/for_web/news.html
    The client would like a scroll bar here so that all of the news articles can be viewed on one page without the rest of the page disappearing off the monitor.
    I read Bob's advice but now that I've come to have a go at adding the code I'm not sure where to add it. Also, do I need to add a div inside the table cell, and if so how do I do that? I've looked on a few forums and found similar bits of code to use but haven't got a clue where to include it...
    <div style="overflow: auto; height: 100px; width: 200px;">Put your text or images or anything in here.</div>
    Would someone please have a look at my code and advise me on what I need to do.
    Thanks.

  • How to get a scroll bar to scroll down as new elements are added

    I have a JPanel that displays a list of information. As new information is added to the bottom of the list, a scroll bar appears. I require the scroll bar to scroll down as the new elements are added so that the most recent one's are in view all the time. Any ideas on how to do this?
    Thanks

    before adding each component.
    get the scrollbar object
    store the
    ScrollBar sb = JFrame.getScrollBar();
    int cmax = scrollbar.getVisibleAmount();
    add component .....
    int nmax = scrollbar.getVisibleAmount();
    int diff = nmax - cmax;
    sb.setValue(sb.getValue() + diff);
    assuming you can get the scrollbar object from the
    JFrame, ContentPane of JScrollPane.

  • Adding a scroll bar to the legend in flex 4

    How can i add a scroll bar to the legend in Flex 4?
    I am to scroll the bars in the bar chart but i am unable to scroll the legend items.
    Can anybody help me out as soon as possible?

    Hello,
    The feature you are looking for is not there in Adobe Muse.
    I would suggest you to post this as a feature request on our "Ideas for features in Adobe Muse" section of the forums : http://forums.adobe.com/community/muse/ideas
    You might see this feature in future releases of Adobe Muse.
    Hope this helps.
    Regards,
    Sachin

  • Adding a scroll bar to tabbed panel content?

    I have set a specific height to tabbed panels and I don't
    want them to expand according to content. Instead I want to add a
    scroll bar to the tabbed panels. How can i do this?

    Sure it's possible.
    Edit the TabbedPanelsContent class in the CSS file.
    Add a specific height to it and then add an overflow:auto;
    rule to it.
    .TabbedPanelsContent {
    padding: 4px;
    overflow: auto;
    height: 200px;
    When styling Spry Widgets, for the most part, just think of
    them as HTML. Add a height and a scrollbar just as you would to any
    DIV.
    Hope this helps,
    Don

  • I have somehow added a divider to my browser screen. When I open firefox there are 2 screens with seperate scroll bars. I am not using the add on feature that allows screen seperation. I cannot find a command to remove the 2nd screen.

    The Left side of my browser screen has a seperate screen with it's own scroll bar. I can use the curser to pull this screen half way to the right. it has a seperate web page than the main window. I can't find a command to remove it. I did have a yahoo toolbar I thought may have been involved.

    Hi,
    Please check if this happens in [https://support.mozilla.com/en-US/kb/Safe%20Mode Safe Mode.] Safe mode disables the installed '''Extensions''', themes ('''Appearance''') and '''Plugins''' in '''Tools''' ('''Alt''' + '''T''') > '''Add-ons'''.
    [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]

Maybe you are looking for

  • Third Party Tree Menu's

    Is it just me, but do others share the view that the tree menus available by default within APEX (2.0 - haven't seen 2.2.1 or 3.0) are pretty basic. Has anyone implemented anything more elegant or even third party menu's such as:- http://www.sothink.

  • IAS 10.1.2.0.2 on Enterprise Linux

    hi all, we are venturing into the world of oracle on linux (without any real knowlege on linux), so ive decided on installing Enterprise Linux 5 rather than ubuntu or similar. ive installed standard Enterprise Linux 5 setup on a server and included t

  • Can I use Photoshop Elements 3.0 with Windows 7?

    Can I use Photoshop Elements 3.0 with Windows 7?

  • What is the most basic, standalone version of Photoshop?

    Hello Everyone! My trial recently ended on Photoshop CS6, it was great! However, much more than i needed. I specifically need only the magic brush/eraser tool and things along those lines. Is there a way or a version of Photoshop that is just and onl

  • E&M with Motorola

    Hello, We have the following scenario: 11 sites for ISF that are being linked via microwave units. In each site we are installing a security router (security 2801) in order to provide the site-site VPN (DMVPN) between all sites. We have in each site