JScrollPane doesn't adjust itself to the view component

I have an applet that shows a JPanel in JScrollPane:
form the applet:
public void init() {
getContentPane().setLayout(new BorderLayout());
panel = new SnapCanvas(); //snapCanvas extends JPanel and is not a Canvas
drawGraph(graph);
jScrollPane = new JScrollPane(canvas);
getContentPane().add(jScrollPane, BorderLayout.CENTER);
setVisible(true);
canvas.repaint();
Now this works fine, but if the JPanel's (called canvas in the code) prefered size is changed the scroll pane doesn't adjust itself. What do I do in order for the JScrollPane to adjust when the JPanel is changed?
Thanks

foubd the solution in http://java.sun.com/docs/books/tutorial/uiswing/components/scrollpane.html#sizing

Similar Messages

  • When I open a new window, it doesn't attach itself to the bottom toolbar? I'm using XP Pro and Firefox 6.0.2.

    It's explained pretty well in my initial question. Not sure what else you would need in the way of details.
    I will say it's been going on for a month or so, and it happens every time I start Firefox, and every time I open a new window.

    Thank you for taking the time to leave an answer for me, Poochie1. I really appreciate your attempt at helping me.
    Unfortunately, as smart as I thought I was when I asked the question, I apparently wasn't that smart, because I didn't explain my problem so you'd know what the heck I was talking about.
    I think it's because I'm probably not using the correct terminology. I'll try again.
    When I open a new window, it just kind of floats on the screen. Before this new update, I could open a window and it was lined up with the start taskbar located at the bottom of the screen. Sometimes the new window will cover up the taskbar partially, and sometimes completely. I have to move it up and align it with the taskbar. Then, when I open another new window, I have to line that one up with the window underneath it.
    I hope that description is better than my first one, and I hope you can make some sense out of it, Poochi (and anyone else who happens by here).
    Again, thank you for your help.

  • Hello my name is Juan and I own a iPod, the newest one, and 3 days ago I rented 2 movies from iTunes on the iPod and one has expired but doesn't remove itself from the downloads pg is there a way where I can get rid of it? Its takin up my memory

    Hello my name is Juan and I own an iPod touch, the newest one, and I rented 2 movies the other day in itunes through the ipod and I was able to download one movie and watch it but the with the other one I havent watched...it downloaded it and watched like 3 minutes of it then I had to download it again but it had already expired but it's still in the download page in iTunes and it says error to download tap again to retry and I did but it didn't work so I don't know what to do...is there anyway I can take it out of my download page? Because its takin to much space in my iPod >_<

    Transfer all of your content to the computer:
    Tunes Store: Transferring purchases from your iPhone, iPad, or iPod to a computer
    http://support.apple.com/kb/HT1848
    Then try turning the device off and on again. I'd leave it off for 10-15 minutes, but that is up to you:
    http://support.apple.com/kb/HT1430
    If the item is still there, you may need to restore the device:
    http://support.apple.com/kb/HT1414
    Hope that helps . Worst case scenario, you may need to write into iTunes support to see if they can also help!!

  • What is this Screen Problem that adjusts itself with the lid movement ?

    I am getting this problem, check out the video to know it exactly and I am posting images for quick reference too. And let me know, what is this and what can be done to rectify it. This machine was bought in December 2013 and it has been approximately 1.5 years and I am getting this weird prolem which seems to grow only. PS. I have updated my BIOS. http://postimg.org/image/681qtc0pj/
    http://postimg.org/image/eetqkwqs7/
    http://postimg.org/image/gko1feu8n/
    http://postimg.org/image/4mr2f9fvb/
    http://postimg.org/image/7je3fjlp3/
    http://postimg.org/image/6ftz3l11z/
    http://postimg.org/image/6pww96qaf/ and here is th video link - https://drive.google.com/open?id=0BymANDKV-8hfTVVIclZmX285cWc

    Hi , Thank you for posting. I have read your post, and I understand that you are experiencing a problem with the display. Here is a link may help you.HP Notebook PCs - Troubleshooting a Notebook LCD Panel Issue (Windows 8/8.1, 7) If you finish the troubleshooting, and find out it is a hardware issue, please use the following link http://www.hp.com/contacthp to create a case for your issue, and contact HP. If you live outside the US/Canada, please click the link below to get the contact information for your region.
    http://www8.hp.com/us/en/contact-hp/ww-phone-assist.html Let me know if you need further assistance. Good luck,

  • Clip from Timeline not showing up in the Viewer

    why in Final Cut Pro when i have a clip in the time line and i want to add an effect or slow the clip down or speed it up, i double click on my clip in the timeline and it doesn't show up in the Viewer as only the clip. it is the entire footage that i have captured with my clip that want to edit.
    the only thing that i want to edit in between  the two arrows ______ ^^^^.
    but when i double click the clip when its in the TimeLine it just shows up in the viewer along with the entire imported clip along with it.

    That's what Final Cut does.  Anything outside those arrows are the handles for the clip.  It's not going to affect your master clip if you add your effects or filters.  (Unless you actually add them to it specifically).  If you were to subclip your footage it may act more like what you are expecting.

  • Is there an option to have the cursor automatically position itself over the preferred default on an option screen (like when given the options to select OK or CANCEL). I believe this feature existed on 3.6. THANKS!

    In v4 RC the cursor just sits on the lower left of screen, doesn't position itself on the recommended option when the select-option screen comes up. On previous versions of FF the cursor positioned itself over the recommended option.

    Hi blabla12345,
    (untested and without warranty)
    replace this line:
    const sSaveCUBE = "CUBE";
    with this:
    const sSaveCUBE = "cube";
    Have fun

  • Suggest to better design the view?

    Hello Experts,
    we are in the process of designing a huge User Interface using WDJ for our client. And this would contain many views which has to render few UI Elements based on the End Users action. For eg., in a view there will be a few default elements displayed with a Button to Add a couple of Table UI Element and a couple of Input Fields upto 5 or 10 times.
    I just want make sure to keep the view/component/custom controller lite , how could I design this particular view?
    Any thoughts or ideas or suggestions are very much helpful.
    Thanks in advance
    Balaji

    Hi,
    If you know the number of UIs in design time, Please create them in design time. If not go for Dynamic UI Generation.
    I would prefer Matrix layout over Grid layout. Check out the following link for more info
    http://help.sap.com/saphelp_nw04/helpdata/en/5b/bea93e6c514310e10000000a114084/frameset.htm
    Please check out the thread for Transparent Containers
    Re: Best Practices for using Transparent container UI element in webdynpro
    - Saravanan K

  • Avoid rendering of (view,component Usage embedded on TAB) on Timed Trigger

    Hi,
       I have a WD application build based on header ( icons; normal label; input elements ) , a timed trigger and a tab strip which has 3 tabs. The 3 tabs have View container element for whcih i am attaching 3 views of the same component .  TAB A part which i am viewing holds a image. The Timed Trigger is needed to enable icon on the header. This is happening well after my delay time of 60 SECS. But this one is having impact of regenerating the image again ( due to the rendering ) which is not at all required.  I want to have the rendering only for the above header part only.   But as i heard from Thomas post that after the phase cycle is done. rendering loads all the views, component usages embedded for the VIEW.
    conditonally i am doing the action of CANCEL NAVIGATION in WDDOBEFORENAVIGATION  when Timed Trigger fires.Due to this one i could avoid the MODIFYVIEW calls of the respective views embedded; but i could not avoid the rendering of the IMAGE ( TAB A ).
    Is there any way to avoid the rendering on those tabs part ( 3 views embedded ). I could see that DELTA rendering is enabled for my sap version but it would be not much help.
    Thanks and Regards,
    Satish A.

    Hi Alex.
    I already tried this. But a bit different. One of my component should have different entry views. So I defined multiple interface inbound plugs in the window of the subcomponent. In the corresponding (inbound) handler methods of the window I fired corresponding outbound plugs which were connected to different views. The main component had different links which were connected to the corresponding interface inbound plugs of the embedded component.
    When I clicked the first link, the correct view of the subcomponent was shown. When I then clicked the next link which should show another view of the same subcomponent the corresponding inbound handler was called but no navigation was done.
    Now when I rest the component before navigating everything works fine.
    But thanks for the hint.
    Cheers,
    Sascha

  • Aperture 3.2.3 and NIK plugins. Intermittently, the viewer doesn't update an image adjusted using several NIK plugins, though the browser strip does. The viewer updates once Aperture is quit and re-launched. IS there some explanation for this recent behav

    Aperture 3.2.3 and NIK plugins. I use several of these plugins. Recently, and intermittently, the edited image fails to update in the viewer until Aperture is quit and re-launched, even though it is updated in the browser strip. I have assumed the NIK software must be working because the problem occurs from time to time regardless of which one is used. Is there some explanation?

    See this known issue:
    http://support.apple.com/kb/TS4237
    Not sure why Apple has not fixed this one yet. It is consistent with NIK plug-ins as well as Photoshop (CS5 and CS6).
    Big fumble from my point of view.

  • Pages 5.5.1: fit width view doesn't adjust

    Other than the answer 'keep using Pages 09 until I absolutely have to switch to something else', is there any way to get the fit width view in latest Pages to adjust as you resize the window?  In 09 the page is responsive, and if I change the window size, the view and zoom change accordingly.  In the latest Pages however, when I choose the fit width option and resize the window, the width doesn't change dynamically.
    Thanks for your help
    Trish
    iMac 27" running Yosemite and latest version of Pages

    Silence, (crickets chirping).

  • How to get a materialized view get to refresh itself after the job is "broken"

    we created a materialized view sometime ago with the following statement:
    create materialized view SXV_PUB_EMPLOYEE_CERT_ALL_M
    refresh complete on demand
    start with to_date('30-08-2009 04:00:00', 'dd-mm-yyyy hh24:mi:ss') next trunc(sysdate) + (28/24)
    as
    select  sxv_emp_cert_all.*
    from    sxv_employee_certification_all sxv_emp_cert_all;
    this week we found out it had not been refresh for about a month
    In dba_jobs the column broken was 'Y', next_date time something like 01-01-4000 and failures 16
    when I ran it manually by executing
    BEGIN DBMS_MVIEW.REFRESH('SXV_PUB_EMPLOYEE_CERT_ALL_M', 'C'); END;
    I found that one of the columns was too small (probably a columns of one of the underlying tables had been extended since the creation of the materialized view)
    After fixing this I ussied yesterday (on 29-8-2013) the statement :
    alter materialized view SXV_PUB_EMPLOYEE_CERT_ALL_M
    refresh complete on demand
    start with to_date('30-08-2009 04:00:00', 'dd-mm-yyyy hh24:mi:ss') next trunc(sysdate) + (28/24)
    after this the table dba_jobs showed me 30-08-2013 04:00:00 as next date
    I was expecting it to run this night at 04:00, but it didn't
    the last_date column value was still from about a month ago, the column broken still shows 'Y'
    and the next date 30-08-2013 04:00:00 (while it should been set to 31-08-2013 01:00:00
    Rrunning
    BEGIN DBMS_MVIEW.REFRESH('SXV_PUB_EMPLOYEE_CERT_ALL_M', 'C'); END;
    gave no errors this time
    and in User_Mview_Analysis the last_refresh_date column showed the date/time I had executed it
    Any idea how to get the job "unbroken" again so that the view refreshes itself every night?
    the database is Oracle Database 10g Release 10.2.0.4.0
    regards,
    Remco

    thanx for all your helpful and correct answers . but eventually I found it myself
    exec dbms_job.broken(<jobnumber>, false);

  • [Photoshop CC 2014] Click&hold-move-release doesn't work when adding adjustment layer from the layer panel

    When selecting a menu item I used to click the left mouse button and hold it down, move the pointer to the desired menu item and release the mouse button. Everything works fine in the mine menu, but there's a problem when adding new adjustment layer from the layer panel: when I release the button nothing happens, I have to press the button again. In previous PS version it worked fine. How can I fix this?

    I don't think that is user fixable, meaning you'll have to wait till adobe fixes it with an update.
    Photoshop cc 2014
    windows does not work
    mac does work
    Did you already post over here:
    [Photoshop CC 2014] Click&hold-move-release doesn't work when adding adjustment layer from the layer panel

  • I'm trying to set up a dual monitor for my new iMac. I'm using a second display I used with my old G5. My iMac recognizes the second monitor but the monitor won't turn on. Power button doesn't do anything on the monitor itself.

    I'm trying to set up a dual monitor for my new iMac. I'm using a second display I used with my old G5. My iMac recognizes the second monitor but the monitor won't turn on. Power button doesn't do anything on the monitor itself.

    If it won't turn on then the monitor is dead (power supply?, video circuits?).  Not worth repairing.
    If you have a new iMac then it has thunderbolt.  So exactly what is that monitor you are trying to connect?  For TB you can connect a mini-displayport monitor.   Probably (not 100% sure with TB) can use dvi or vga too if you have the appropriate adapter.

  • How do I view a document sent to me in Winmail.dat(2.0MB).   I have downloaded and installed the libero app butthis doesn't help me open the winmail.dat document. Help very much appreciated. THANKS JANE

    How do I view a document sent to me in Winmail.dat(2.0MB).   I have downloaded and installed the libero app but this doesn't help me open the winmail.dat document. Help very much appreciated. THANKS JANE

    http://www.creativeinaustria.com/LetterOpenerPro?utm_source=macupdate.com&utm_me dium=referral&utm_campaign=Distribution%2BChannels
    Try it
    http://www.macupdate.com/app/mac/22614/letter-opener
    http://www.creativeinaustria.com/LetterOpenerLite

  • I "Reset Firefox – easily fix most problems", but it doesn't look like the view on getting started: ie

    I "Reset Firefox – easily fix most problems", but it doesn't look like the view on getting started tutorial, ie: there's no "Firefox tab". I would really like to clean out all the old stuff, including add-ons and plug-ins that I've tinkered in, but don't know about or need any more, then start fresh with the latest Firefox. How can I do that?

    The Firefox button does not or did not showupon Windows XP by default.
    It is easy to display that just remove the option to display the menu bar toolbar. Note
    # The functions and available optons are much the same just organised differenttly
    # Menu tool bar may be displayed temporarily; even if the Firefox Button is present: by holding down the keyboard '''Alt''' key
    #To remove the menu toolbar use '''View -> Toolbars -> []Menu Toolbar'''<br /> see [[Display the Firefox button menu instead of the menu toolbar]]

Maybe you are looking for