Container's validate does not update removal

the validate() method does not update the display to show the remval of a component from a container. A way to go around: use repaint() instead.
Please see the following code:
import java.awt.BorderLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JScrollPane;
import javax.swing.JTextField;
import javax.swing.JToolBar;
import net.effortech.harry.swing.Laf;
public class ScrollPaneViewPort extends JFrame {
  private JButton add = new JButton("Add");
  private JButton remove = new JButton("Remove");
  private JTextField field;
  private JScrollPane scrollPane;
  private ActionListener al = new ActionListener() {
    public void actionPerformed(ActionEvent e) {
      JButton s = (JButton) e.getSource();
      if (s == add) {
        add.setEnabled(false);
        remove.setEnabled(true);
        field = new JTextField();
        scrollPane = new JScrollPane(field,
            JScrollPane.VERTICAL_SCROLLBAR_NEVER,
            JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
        getContentPane().add(scrollPane, BorderLayout.SOUTH);
        validate();
      } else {
        add.setEnabled(true);
        remove.setEnabled(false);
        getContentPane().remove(scrollPane);
        validate();
        //repaint();
  public ScrollPaneViewPort() {
    super("ScrollPane ViewPort");
    JToolBar tb = new JToolBar();
    tb.add(add);
    remove.setEnabled(false);
    tb.add(remove);
    add.addActionListener(al);
    remove.addActionListener(al);
    getContentPane().add(tb, BorderLayout.NORTH);
    setBounds(100, 100, 500, 400);
    setDefaultCloseOperation(EXIT_ON_CLOSE);
    setVisible(true);
  public static void main(String[] args) {
    new ScrollPaneViewPort();
}

use repaint() insteadThat matches our experiences.

Similar Messages

  • Podcast does not update on iTunes

    Podcast does not update on iTunes
    the url
    http://itunes.apple.com/tw/podcast/id335308817
    the last date is 2010/6/17
    But the feed url
    http://iphone.realma.com/podcast/ettv.xml
    the last date is 2010/10/21 and daily update
    Why? Is there any thing wrong in the feed url?
    Thank you!
    Message was edited by: realma

    I'm afraid I can't make any sense of this. the iTunes Store page lists 301 episodes from 12 January 2010 to 17 June 2010. If you click on the 'subscribe free' button your iTunes application subscribes to the feed at the URL you give, which contains rather fewer episodes from 17 September 2010 to 22 October 2010 (today).
    It's not unknown for something in the feed to be OK with the application but not the Store, but the feed validates in FeedValidator and I can't see anything wrong with it - it's almost impossible to read as it's all on one line, but it doesn't seem to contain any of the usual culprits.
    The only explanation which would make any sense (and which doesn't seem to be the case) would be if the feed had been complete only to 17 June until a few days ago, and you only recently replaced it with the current set of episodes: it normally takes 1-2 days for changes to appear (so even under normal circumstances today's episodes wouldn't appear yet in the Store, only on subscribing). Since your feed contains episodes back to September this doesn't seem to apply, but I can't see any other reason.

  • SSRS 2012 (SP Integrated) report on SP 2013 PerformancePoint Dashboard: when too many filter items selected together report does not update anymore!

    I am having a situation with SSRS 2012 (SP-integrated) report rendered on SP 2013 PerformancePoint Dashboard using linked PerformancePoint (PP) filters.
    The report works fine as long as too many PP filter items are not selected at the same time. When gradually selecting more items from the filter, the report updates itself until more than a sepecific numer of filter items are selected - the report simply
    does not update itself anymore. This "specific number of filter items", when hit, generates the following error in ULS:
    An exception  occurred while rendering a Web control. The following diagnostic information might help to determine the cause of this problem:  System.UriFormatException: Invalid URI: The hostname could not be parsed.    
     at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind)    
     at System.UriBuilder..ctor(String uri)    
     at Microsoft.PerformancePoint.Scorecards.ServerRendering.ReportViewControl.ReportUrl(SqlReportViewData sqlReportViewData)    
     at Microsoft.PerformancePoint.Scorecards.ServerRendering.ReportViewControl.RenderSqlReport(TextWriter writer, ReportView sqlReportView)    
     at Microsoft.PerformancePoint.Scorecards.ServerRendering.ReportViewControl.RenderReportViewControl(HtmlTextWriter writer, ReportView rv)  PerformancePoint Services error code 20700.
    I already know that the cause of the issue is in the length of the query (perhapse RDL or MDX) that the browser is supposed to pass on to the instance of SSAS.
    Some people had suggested a workaround that was suitable for older versions or non-integrated SSRS (see here: http://social.msdn.microsoft.com/Forums/sqlserver/en-US/cb6ede72-6ed1-4379-9d3c-847c11b75b32/report-manager-operation-cannot-run-due-to-current-state-of-the-object).
    Knowing this, have already done the changes suggested (adding the lines suggested to SP's web.config for Reporting and the web.config of the site on which report is rendred) at no avail, just to make sure.
    I have rednered the same report on the same dashboard using SSRS filters and there is no problem; it just works fine. This has to be a bug in PP that is causing this.
    Has anyone had the same problem with SSRS 2012 (SP-integrated) report rendered on SP 2013 PP dashboard using PP filter? Any fixes or workarounds?
    thnx!

    Hello everybody.
    I confirm the issue in Service Pack 1 Release 2.
    Poor workaround is to remove the repeated infromation from the member keys (in SSAS they can be really long).
    The issue seems to be specific to SSRS: Excel Services works well with the same filter.
    Sergey Vdovin

  • Lighroom 5.4 Develop View does not update when changing sliders

    Just updated to Lightroom 5.4 (using Adobe CC) on Win8. After going to "develop view" on any photo and changing the exposure or any other slider does not update the main view of the photo. It does however update the thumbnail in the film strip and the second monitor window correctly. I've tried everything I can think of:
    (1) downgrading to LR 5.3 (which used to work)
    (2) forcing 1:1 and standard preview regeneration
    (3) uninstalling the re-installing Lightroom (both 5.3 and 5.4)
    (4) Optimizing catalogue
    (5) Removing the Adobe AppData folder
    (6) Creating a brand new catalogue with zero photos, importing a single photo and trying to change exposure/contrast on that
    None of these result in the develop view of the picture changing when I change the sliders.
    Do you guys have any experience with this?

    The chances of me suspecting monitor color profile causing bugs in LR was very slim. =)
    So were mine, especially when only the view itself doesn't work, but all other stuff works fine. Well, I probably have really not good colour profile, luckly you can change it after the lr is launched - it won't cause the problem untill next restart (at least works for me). And hopefully once my calibrator arrives lr will work ok with its colour profiles..

  • 5310 does not update

    It simply does not update to the latest software, I tried removing memory card, SIM (required for update), restarting the handset and still no luck.
    Here is the screenshot of the screen i get when I update:
    http://img25.imageshack.us/my.php?image=failededu.png

    these are some things that you can try to do. first start with the reinstallation and cleaning all drivers and stuff of the pc suite and making sure that you have the latest pc suite version. 
     /discussions/board/message?board.id=topfaq&thread.id=112
    some of these may not apply to your phone but you can try the general steps and see if it helps any 
    You know what I love about you the most, the fact that you are not me ! In love with technology and all that it can offer. Join me in discovery....

  • Reschedule does not update schedule line after upgrade

    Dear All,
    After upgrade to ECC6.0, the reschedule does not update EKET any more but it update ekpo as usual.I debugged it , before the function module SD_BACKORDER_**_SAVE everything is ok.
    I also checked the sap note for the new field in T161V.But When I choose other option about customzing. eket are updated every time when the reschdule program run.This will lead double delivery.
    Do you have any suggestion?
    Edited by: Edward on Feb 23, 2010 9:03 PM

    Hi,
    On the initial screen of V_V2
    Remove tickmark of SIMULATION, Then it will update schedule lines in sales document
    Kapil

  • Reschedule does not update the schedule line

    Dear All expert,
    After upgrade to ECC6.0, the reschedule does update the schedule lines eventhough it list all the required to be update in the list.
    As I checked , it update the ekpo successfully but does not update the eket.
    Is there any suggestion ?

    Hi,
    On the initial screen of V_V2
    Remove tickmark of SIMULATION, Then it will update schedule lines in sales document
    Kapil

  • Type 2 SCD -- does not update the old value.

    I have following columns in the source table:
    SSN, credit_score
    In the target, I have following columns,
    SK_ID, SSN, credit_score, flag
    I am flagging the old credit_score as 'N' when updating the row and at the same time it is supposed to enter a new credit score with flag 'Y' in another row.
    Second, If a row is completely new, It should be inserted with the flag 'Y'.
    SK_ID is the surrogate key and SSN is the natural key, My trigger column is credit_score.
    The problem is that when I run this type 2 mapping, it does not update anything but inserts the new rows only.
    I have posted the screen shots at the following link.
    http://www.box.net/shared/ea9v48r0xa
    Thanks for your help in advance.

    First of all, thanks for the reply...
    You can also look at the screen shots I posted in previous post.
    Here is how I am updating the rows (update logic).
    If source_SSN=target_SSN and source_credit_score!=target_credit_score
    then flag = 'N' (this is the update from 'Y' to 'N' after which i will insert a new row containing new value of credit_score with flag 'Y')
    As an example, if my old rows in the target table were:
    sk_id SSN credit_score flag
    101 2212 654 Y
    102 3023 707 Y
    Now let's say my source table has these values.
    SSN credit_score
    2212 648
    2220 690
    Then my target table should be like this:
    sk_id SSN credit_score flag
    101 2212 654 N
    103 2212 648 Y
    102 3023 707 Y
    104 2220 690 Y
    Do you see what I mean...

  • My firefox beta 12 using Linux platform does not update to firefox RC1 via the "check for update" function. I know windows' beta version had this fixed, when would Linux get similar support ?

    Current platform : Linux
    Current firefox version : Firefox 4 beta 12
    Issue : does not update to RC 1 using the check for update feature.
    Background : previously downloaded beta 8 and then it automatically updated to beta 12 using update features but for RC1, it does not.
    I know users under Windows platform had same problem but was resolved and they can now update via check for update feature.
    Please implement for Linux users too.
    Thanks !!

    If you can't update then you can download and install the full Firefox 4 RC version.
    * http://www.mozilla.com/firefox/all-beta.html

  • Can't add music my iPhone from iTunes.  When I try to drag a song over to my phone, I get the circle w/ the syncing line through it, but it does not update/load.  [Manually manage music and videos] is checked. And, this is the only Mac I have ever used to

    Can't add music my iPhone from iTunes.
    When I try to drag a song over to my phone, I get the circle w/ the syncing line through it, but it does not update/load.
    [Manually manage music and videos] is checked. And, this is the only Mac I have ever used to add music to my phone.
    Also, just updated the phone's software today, and iTunes' software is already up to date.

    Hi Gregg,
    Have you tried resetting the device (nothing will be lost): Hold down the Home and Power buttons at the same time and continue to hold them down until the Apple appears (up to 30 seconds). Once the Home screen redisplays, see if your Music app is behaving normally.
    Cheers,
    GB

  • HT2513 The date on my dock does not update automatically ? - Ps anybody.

    I use MACCBOOK PRO with OS X ver 10.6.8.
    I  Cal Version 4.0.4 (1395.7)
    Sometimes the current date does not update on my ical icon in the dock. After clicking on it the date becomes OK.
    I would appreciate if someone has a solution.

    I solved the problem by uninstalling Glims.

  • Mobile.me Calendar does not update/sync on iPhone

    Since I did my upgrade to the new version of Mobile.me Calendar (as requested by Apple!), my iPhone no longer shows entries that I have typed into the Mobile.me Calender website. I no longer use iCal because Apple said it would not work with the new version of Calendar on Mobile.me, so I did the upgrade to stay in sync with calendars on my mobile.me site and iPhone, but the iPhone does not update. I deleted my calendar entries on my iPhone hoping that the Mobile.me would re-sync the data, but that didn't happen either. Here is my info:
    iPhone version 3.1.3(7E18)   Model MA712LL (first original iPhone)
    What else can I tell you to help me please?

    Please always post your System details when you have a question. The upgrade to the new MobileMe calendar produces different results, and different problems, with different versions of OSX.
    Snow Leopard: during the upgrade process your iCal calendars should be moved to MobileMe (this can take some time and you have to wait for it to happen). Once done, your iCal reads the calendars from MobileMe so any changes made in either place will be visible immediately. If this has not happened then this Apple Tech Note provides instructions:
    http://support.apple.com/kb/TS3397
    Leopard: when the upgrade is completed iCal on Leopard will not be able to see the MobileMe calendars until an additional process is carried out, detailed in this Apple Tech Note:
    http://support.apple.com/kb/HT4330
    Tiger: iCal on Tiger cannot read the MobileMe calendars, period. The only workaround is to upgrade to Leopard, or Snow Leopard if possible (Intel Mac required).

  • Manual sync to ITunes does not update music

    I have a generation 3 (I think--it looks like the model number is A1318) IPOD Touch running version 4.1 operating system.  I have ITunes version 12.0.1.26. 
    It does not automatically sync.  When I select manual sync, it appears to go through the process and indicates that it has completed the sync, but nothing has changed.  It does not update the IPOD with new songs from my library.
    Any help would be appreciated.  For example are thees operating systems compatible?  If they are what am I doing wrong.
    Thanks
    Ron

    Try backing up to iTunes and restore from backup
    iOS: Back up and restore your iOS device with iCloud or iTunes
    Note that ll the synced media like apps and music have to be on the computer since they are not included in the backup

  • Batch Split in OBD & billed for the entire Quantity .RG1  register does not update the excise values

    Hi All,
    I am new here . We have batch split in Delivery and 601 happens for the individual batches and billing we bill for the entire quantity . Hence the RG1 does not update the excise values for the batches and it is showing as zero (upon extraction in J2I6). Upon research through the program the latest note which i presume is patched
    The latest note is N158234 which does not show in the program but seems have been patched considering we are using the Latest version of SAP .
    As you see above in the billing we have billed for the whole quantity but RG1 does not update for the since the batches are zero .
    My programmer says because of some note related to cancellation where it says about values H & J in vbfa table and due to which program does not go through the Note for the batch split .
    Now i have checked few other projects in my company and they all seems to be following the program . So i am wondering whether my process or some customization is missing .
    Sales order (no batch determination)  , in delivery the batches are picked through wm to and batch split happens in the delivery . Then billling for the whole quantity . We have automatic excise invoice creation enabled so no J1IIN .
    Can somebody help me .
    Thank you

    My programmer says because of some note related to cancellation where it says about values H & J in vbfa table and due to which program does not go through the Note for the batch split
    Which field (H & J) they were referring in VBFA ?
    i have checked few other projects in my company and they all seems to be following the program
    How about the other projects' values in VBFA where your techinical team is guessing some issue.  Have you compared this?
    Since you have already the note 158234 implemented in your system, ideally, you should not face any issue.
    G. Lakshmipathi

  • HT1277 Mail on my Mac computer does not update when I update my mail on my phone and iPad.  Can anyone help me with this?  Is there a setting I need to check?

    Mail on my Mac computer does not update when I update my mail on my iPhone and iPad. Can anyone help me with this?  Is there a setting that I need to check?

    All that you had to do was to sign into the old account in order to update those apps. What I mean is that you just needed to sign into that account in the store settings like I described and that should have worked. You didnt need to enter the credit card information again - you justed needed to use the old ID and password.
    Anyway, I think the good news is that if everything else is OK with the new account, just download iBooks with the new ID - it's a free app so its not like you have to pay for it again. I'm not sure what the other App is that you are talking about - but if it is the Apple Store App - that is free as well.
    Try this anyway, when you try to update iBooks, just use the old password if the old ID still pops up.
    Did you try signing into the store settings with your new ID and see what happens with the updates then?

Maybe you are looking for

  • Mail in mavericks ole when i transfer a mail to another map on my iphone its copies 100 times

    Hi, When i transfer a mail on my imac to another folder on my iphone there are 100 copies of the transfered mail? They aren't going away. I am very frustrated to delete 100 faulty mail copies  one by one Its all working in icloud. On my imac i thankf

  • Problems with Solaris 10 Secure Desktop server and Windows XP Client

    Solaris 10 Secure Desktop server - Windows XP Client - I've tried to open the Solaris Machine's desktop using the browser based http://MysolarisServerName/sdg and the windows native client http://MySolarisServerName/tarantella. I log in ok to the Sol

  • Alternatives to Spotify

    This latest desktop update is the straw that broke the camels back for many paying customers. So I ask: What alternatives to Spotify have you tried, and would you recommend? List pros and cons.

  • Graphic Card Question - Do I Have the Wrong One?

    I just got my new Pavilion dv7 less then 2 weeks ago. It was just today though that as I was checking around to see how well my laptop could play some games, I find that what I think is the wrong graphic card in my laptop. On the box it says I should

  • Statspack Downloads.

    I attempt to download the Statspack file: 817_prod.tar. I click the link which brings me to the disclaimer page. I click all of the check boxes, and click the "I Accept" button. I am returned to the original download page without error, and no downlo