Problem removing children from within an event handler

I'm trying to remove a movie clip from an onComplete handler.
When I try to do this I get the following error
"ArgumentError: Error #2025: The supplied DisplayObject must
be a child of the caller."
The point where my loader is complete is the time that I have
to remove this movieclip.
Would any body be able to tell me what the error means and
help me with a way around it?
Thanks
dub

You can always do it this way -- doesn't matter which display
list the object is in.

Similar Messages

  • WPF UI running in seperate runspace - able to set/get controls via synchronized hash table, but referencing the control via the hash table from within an event handler causes both runspaces to hang.

    I am trying to build a proof of concept where a WPF form is hosted in a seperate runspace and updates are handled from the primary shell/runspace. I have had some success thanks to a great article by Boe Prox, but I am having an issue I wanted to open up
    to see if anyone had a suggestion.
    My goals are as follows:
    1.) Set control properties from the primary runspace (Completed)
    2.) Get control properties from the primary runspace (Completed)
    3.) Respond to WPF form events in the UI runspace from the primary runspace (Kind of broken).
    I have the ability to read/write values to the form, but I am having difficulty with events. Specifically, I can fire and handle events, but the minute I try to reference the $SyncHash from within the event it appears to cause a blocking condition hanging both
    runspaces. As a result, I am unable to update the form based on an event being fired by a control.
    In the example below, the form is loaded and the following steps occur:
    1.) Update-Combobox is called and it populates the combobox with a list of service names and selects the first item.
    2.) update-textbox is called and sets the Text property of the textbox.
    3.) The Text value of the textbox is read by the function read-textbox and output using write-host.
    4.) An event handle is registered for the SelectionChanged event for the combobox to call the update-textbox function used earlier.
    5.) If you change the selection on the combobox, the shell and UI hangs as soon as $SyncHash is referenced. I suspect this is causing some sort of blocking condition from multiple threads trying to access the synchronized nature of the hash table, but I am
    unsure as to why / how to work around it. If you comment out the line "$SyncHash.TXT_Output.Dispatcher.Invoke("Send",[action]{$SyncHash.TXT_Output.Text = $Value})" within update-textbox the event handler will execute/complete.
    $UI_JobScript =
    try{
    Function New-Form ([XML]$XAML_Form){
    $XML_Node_Reader=(New-Object System.Xml.XmlNodeReader $XAML_Form)
    [Windows.Markup.XamlReader]::Load($XML_Node_Reader)
    try{
    Add-Type –AssemblyName PresentationFramework
    Add-Type –AssemblyName PresentationCore
    Add-Type –AssemblyName WindowsBase
    catch{
    Throw "Unable to load the requisite Windows Presentation Foundation assemblies. Please verify that the .NET Framework 3.5 Service Pack 1 or later is installed on this system."
    $Form = New-Form -XAML_Form $SyncHash.XAML_Form
    $SyncHash.Form = $Form
    $SyncHash.CMB_Services = $SyncHash.Form.FindName("CMB_Services")
    $SyncHash.TXT_Output = $SyncHash.Form.FindName("TXT_Output")
    $SyncHash.Form.ShowDialog() | Out-Null
    $SyncHash.Error = $Error
    catch{
    write-host $_.Exception.Message
    #End UI_JobScript
    #Begin Main
    add-type -AssemblyName WindowsBase
    [XML]$XAML_Form = @"
    <Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <Window.Resources>
    <DataTemplate x:Key="DTMPL_Name">
    <TextBlock Text="{Binding Path=Name}" />
    </DataTemplate>
    </Window.Resources>
    <DockPanel LastChildFill="True">
    <StackPanel Orientation="Horizontal" DockPanel.Dock="Top">
    <Label Name="LBL_Services" Content="Services:" />
    <ComboBox Name="CMB_Services" ItemTemplate="{StaticResource DTMPL_Name}"/>
    </StackPanel>
    <TextBox Name="TXT_Output"/>
    </DockPanel>
    </Window>
    $SyncHash = [hashtable]::Synchronized(@{})
    $SyncHash.Add("XAML_Form",$XAML_Form)
    $SyncHash.Add("InitialScript", $InitialScript)
    $Normal = [System.Windows.Threading.DispatcherPriority]::Normal
    $UI_Runspace =[RunspaceFactory]::CreateRunspace()
    $UI_Runspace.ApartmentState = [System.Threading.ApartmentState]::STA
    $UI_Runspace.ThreadOptions = [System.Management.Automation.Runspaces.PSThreadOptions]::ReuseThread
    $UI_Runspace.Open()
    $UI_Runspace.SessionStateProxy.SetVariable("SyncHash",$SyncHash)
    $UI_Pipeline = [PowerShell]::Create()
    $UI_Pipeline.Runspace=$UI_Runspace
    $UI_Pipeline.AddScript($UI_JobScript) | out-Null
    $Job = $UI_Pipeline.BeginInvoke()
    $SyncHash.ServiceList = get-service | select name, status | Sort-Object -Property Name
    Function Update-Combobox{
    write-host "`nBegin Update-Combobox [$(get-date)]"
    $SyncHash.CMB_Services.Dispatcher.Invoke($Normal,[action]{$SyncHash.CMB_Services.ItemsSource = $SyncHash.ServiceList})
    $SyncHash.CMB_Services.Dispatcher.Invoke($Normal,[action]{$SyncHash.CMB_Services.SelectedIndex = 0})
    write-host "`End Update-Combobox [$(get-date)]"
    Function Update-Textbox([string]$Value){
    write-host "`nBegin Update-Textbox [$(get-date)]"
    $SyncHash.TXT_Output.Dispatcher.Invoke("Send",[action]{$SyncHash.TXT_Output.Text = $Value})
    write-host "End Update-Textbox [$(get-date)]"
    Function Read-Textbox(){
    write-host "`nBegin Read-Textbox [$(get-date)]"
    $SyncHash.TXT_Output.Dispatcher.Invoke($Normal,[action]{$Global:Return = $SyncHash.TXT_Output.Text})
    $Global:Return
    remove-variable -Name Return -scope Global
    write-host "End Read-Textbox [$(get-date)]"
    #Give the form some time to load in the other runspace
    $MaxWaitCycles = 5
    while (($SyncHash.Form.IsInitialized -eq $Null)-and ($MaxWaitCycles -gt 0)){
    Start-Sleep -Milliseconds 200
    $MaxWaitCycles--
    Update-ComboBox
    Update-Textbox -Value $("Initial Load: $(get-date)")
    Write-Host "Value Read From Textbox: $(Read-TextBox)"
    Register-ObjectEvent -InputObject $SyncHash.CMB_Services -EventName SelectionChanged -SourceIdentifier "CMB_Services.SelectionChanged" -action {Update-Textbox -Value $("From Selection Changed Event: $(get-date)")}

    Thanks again for the responses. This may not be possible, but I thought I would throw it out there. I appreciate your help in looking into this.
    To clarify the "Respond to control events in the main runspace"... I'm would like to have an event generated by a form object in the UI runspace (ex: combo box selectionchanged event) trigger a delegate within the main runspace and have that delegate in
    the main runspace update the form in the UI runspace.
    ex:
    1.) User changes selection on combo box generating form event
    2.) Event calls delegate (which I have gotten to work)
    3.) Delegate does some basic processing (works)
    4.) Delegate attempts to update form in UI runspace (hangs)
    As to the delegates / which runspace they are running in. I see the $synchash variable if I run get-var within a delegate, but I do not see the $Form variable so I am assuming that they are in the main runspace. Do you agree with that assumption?

  • Fire event from within another event ?

    It seems that an event fired from within another event does not
    actually execute its code until the firing event completes. The fired
    event's Time value in its Event Data Node indicates the time that it
    was told to execute, but using GetTickCount calls shows that its code
    does not execute until the firing event is finished. This happens
    whether Value Signaling is used to generate a Value Change event or if
    CreateUserEvent and GenerateUserEvent is used. Is this because events
    are placed in a queue ? This behavior is different from Delphi for
    example where the fired event executes right away when called from the
    firing event (before the firing event completes).
    I have an event that executes upon a button value change. I would
    like that same event's code to execute when another button is pressed,
    but also have other code in the second button's event execute after
    that first button's event's code completes. Is there another way to
    accomplish this ?
    Steve

    > It seems that an event fired from within another event does not
    > actually execute its code until the firing event completes. The fired
    > event's Time value in its Event Data Node indicates the time that it
    > was told to execute, but using GetTickCount calls shows that its code
    > does not execute until the firing event is finished. This happens
    > whether Value Signaling is used to generate a Value Change event or if
    > CreateUserEvent and GenerateUserEvent is used. Is this because events
    > are placed in a queue ? This behavior is different from Delphi for
    > example where the fired event executes right away when called from the
    > firing event (before the firing event completes).
    I'm not that familiar with Delphi, but LV events are asynchronous.
    Window
    s OS has two ways of firing events, Send and Post. The LV events
    are always posted. The primary reason is that the LV events are handled
    by a node, not by a callback. The node you are calling is in the middle
    of a diagram, and reentering it not valid.
    > I have an event that executes upon a button value change. I would
    > like that same event's code to execute when another button is pressed,
    > but also have other code in the second button's event execute after
    > that first button's event's code completes. Is there another way to
    > accomplish this ?
    The best way to reuse code is to use subVIs. Firing events, or rather
    sending events is pretty close in other events to making a function call
    dispatched to anyone interested in the event. The event just hides who
    you are calling and makes you put your parameters in a funny format
    stuffed inside the event. IMO it also makes the code very hard to read
    since you don't know what calls what.
    Instead, just put the code into a sub
    VI and call it whenever you need
    to, from the event structure in one or more locations, and from other
    loops and diagrams.
    Greg McKaskle

  • Hi I am having problems removing mail from trash folder. Can anyone help please

    Hi I am having problems removing mail from trash folder. I can send mails to the folder but cannot delete them permanently from the trash folder. I am using Iphone 3G and anm up to date with OS. Can anyone help please

    Check that there isn't a different Trash folder to the one with the proper Trash symbol on it.
    If you see one in your list of folders rather than a separate one, highlight it, then click on Mailbox...Use this mailbox for...Trash

  • I am having problem removing sim from E51

    I have problems removing sim from my E51. it seems. its very tight there.

    Did you already try these steps?
    Restart the iPhone.
    Try another means of reaching the activation server and attempt to activate.
    Try connecting to a known-good Wi-Fi network if you're unable to activate using a cellular data connection.
    Try connecting to iTunes if you're unable to activate using Wi-Fi.
    Restore the iPhone.
    If you receive an alert message when you attempt to activate your iPhone, try to place the iPhone in recovery mode and perform a restore. If you're still unable to complete the setup assistant due to an activation error, contact Apple for assistance.
    copied from iOS: Troubleshooting activation issues

  • Having problems removing tags from script.

    I'm not using the browser to run Adobe Story, but the Desktop version from my iMac.  Cmd + Double Click works, but once every 30 times.  Is anyone else having this problem removing tags from a script?

    There are other ways to remove tags from a script
    From Tagging Panel:
    - Open Tagging Panel from View Menu
    - Click on Edit button. Here you have the option to delete individual tag-items or remove all from the scene.
    From File Menu
    - Open File - Tagging menu
    Here you will find the options to delete all/manually added/automatically added tags.

  • I have a problem when buying from within the game

    I have a problem when buying from within the game
    i used visa..

    All games? Settings > General > Restrictions has an option to prevent In-App Purchases. Is that on?

  • Problem removing components from JLayeredPane

    Hi all,
    I have a problem showing and hiding components on a JLayeredPane. It goes Something like this:
    In my application I have a button. When this button is pressed I use getLayeredPane to get the frames layered pane. I then add a JPanel containing a number of labels and buttons onto that layered pane on the Popup layer. The panel displays and funcitons correctly.
    The problem comes when I try to remove the panel from the layered pane. The panel does not dissappear and I am no longer able to click on anything else in the frame!
    If anyone has any ideas how to get around this or what the problem might be I'd be very greatful to hear it. Sample code follows:
          * Called when the button on the frame is pressed:
          * @param e
         public void actionPerformed(ActionEvent e)
                    JLayeredPane mLayredPane = getLayeredPane();
              int x = 0, y = 0;
              Container c = this;
              while (true)
                   c = c.getParent();
                   if (c != null)
                        x += c.getLocation().x;
                        y += c.getLocation().y;
                        if (c instanceof JRootPane)
                             break;
                   else
                        break;
              mPanel.setBounds(x, y, 235, 200);
              mLayredPane.add(mPanel, JLayeredPane.POPUP_LAYER);
    //And when a listener fires from the panel I use
    mLayredPane.remove(mPanel);
    //To remove it from the layered pane and in theory return the
    //app to the state it was before the panel was displayedThanks again...

    The problem is you only removed it within the program, without actually removing it from the display. If that makes any sense, or whether thats your problem at all.
    If you are only using this line.
    mLayredPane.remove(mPanel);
    I think if you tell it to repaint and revalidate it should work, though i have never used LayeredPane.
    mLayredPane.repaint();
    mLayredPane.revalidate();

  • Problem removing Objects from the stage in Flash CS4 (AS3.0)

    I have a problem with this code:
    this.addEventListener(Event.ENTER_FRAME, vanish);
    function vanish(event:Event):void{
         if(character_mc.hitTestObject(vanish_mc)){
              vanish_mc.parent.removeChild(vanish_mc);
    There are two overlapping objects on my stage: character_mc and vanish_mc.
    As soon as i start the scene[Ctrl+Enter] vanish_mc is VISUALLY removed. But the code still sees a collision somehow. How can i Entirely remove the object vanish_mc?
    Thank you for help and advice.

    Ah I think the problem is what my problem not which I proposed, my bad I was trying to keep it simple.
    the remove code in my problem actually looks like this:
    if(character_mc.hitTestObject(this["dollar_mc_"+String(i)])){
         removeChild(this["dollar_mc_"+String(i)]);
    I wanted it to be that way so I could add infinite "dollar_mc_" ' s without writing myself to death with code and or getting confused.
    Imagine it like a game where a character it picking up dollars, which would disappear once they intersect.
    And that exactly is what gives me that argument.
    Do you know a way i could write this code, or do you suggest to leave it that way...because it does run and work im just getting this argument while debugging.
    Thank you for all the help~

  • How to trigger navigation to a portal iView from server side event handler

    Hi,
    I am modifying the workset map application. I have created custom URL links under each iView which should navigate to different iViews depending on some business logic. So I had to provide a custom event handler for these iVIew links and the path to the next iview is dynamically created by the code in the event handler. Once the new PCD path is generated, the event handler should trigger a navigation to that PCD object. Which APIs can I use to trigger this navigation from the server side event handler? I have done this before in webdynpro where we used WDPortalNavigation (.absoluteNavigation or .relativeNavigation). Is there something similar that i can use in this case (i.e. when developing a simple Portal Application from an AbstractPortalComponent)?

    Hi,
    On my understanding of your requirement.
    the best solution what i think is use Object Based Navigation(OBN).
    Is much suitable to your requirement.
    Moreover you can use
    1.Relative navigation
    2.Absolute navigation.
    In the same way how you used in web dynpro.
    Same thing can be done in abstract portal component also.
    Try using that.
    Thanks & Regards,
    Lokesh
    Edited by: lokesh kamana on Aug 11, 2008 7:23 AM

  • Problem sending mail from within C#

    Sorry, I am posting this question for the second time !!!!
    I have constructed a snippet that sends mail from within C#.In My script, there are will be several receivers of my mail. The script will read from a file, mail addresses and send mail to each individual contained in the file. As test I run the script with
    two mail addresses in the file,one my own and the second with outlook mail. However, the result is I get the mail but the second receiver  never gets it.
       What is the problem ????
    Please help
    I debugged the program and verified that Nsmtp and Mailreceiver are correct
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Net;
    using System.Net.Mail;
    using System.Net.Mime;
    using System.Text;
    using System.Windows.Forms;
    namespace Note_Pss
    public partial class Email : Form
    public Note_Pss.Form1 m_parent;
    Util util = new Util(); string signal = "#";
    char g = System.Convert.ToChar("*");
    char X = System.Convert.ToChar("@");
    Utility_Types utility_type = new Utility_Types(); string P = "";
    char p; String Mailsender; String Npass; String Nsmtp;
    String Mailreceiver; String Mailbody; String MailTitle;
    MailMessage mail = new MailMessage();
    public Email(Note_Pss.Form1 parent)
    InitializeComponent();
    m_parent = parent;
    string ListContent = util.openf(wsk.storagedbase + @"\TemFile");
    wsk.listArray = util.arrayadjust(ListContent, signal);
    private void multi_mail_Send()
    {char g = System.Convert.ToChar("*");
    MailParameters();
    int Count_num = wsk.listArray.Count;
    for (int i = 0; i < Count_num; i++)
    string P = wsk.listArray[i].ToString();
    string[] Sub_File = P.Split(g);
    Mailreceiver = Sub_File[2].ToString();
    Nsmtp = "smtp."+msmtp_name(Mailreceiver, "@");
    Send_Mail();
    //if (Enclosure.Text != "") MailAttachment();
    //MailBody();
    private String msmtp_name(string p, string p_2)
    string P = p.ToString();
    string[] Pp = P.Split(X);
    string bbb = Pp[1];
    return bbb;
    private void MailParameters()
    Mailsender = Sender.Text;
    Npass = Senderpass.Text;
    Mailbody = Body.Text;
    MailTitle = Subject.Text;
    private void Send_Mail()
    try
    MailMessage mail = new MailMessage();
    SmtpClient client = new SmtpClient();
    client.Port = 587;
    client.Host = Nsmtp;
    mail.From = new MailAddress(Mailsender);
    mail.To.Add(Mailreceiver);
    mail.Subject = MailTitle;
    mail.Body = Mailbody;
    textBox1.Text = Nsmtp + " " + Mailreceiver;
    client.DeliveryMethod = SmtpDeliveryMethod.Network;
    client.UseDefaultCredentials = false;
    client.Credentials = new System.Net.NetworkCredential(Mailsender, Npass);
    client.EnableSsl = true;
    client.Send(mail);
    catch (Exception ex) { textBox1.Text = ex.ToString(); }
    private void MailSend_Click(object sender, EventArgs e)
    { multi_mail_Send(); }
    private void button2_Click(object sender, EventArgs e)
    { Enclosure.Text = util.openImage();}
    private void button1_Click(object sender, EventArgs e)
    this.Close();

    Nsmtp and Mailreceiver are verified through debugging:
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Windows.Forms;
    using System.Net.Mail;
    using System.Net.Mime;
    using System.Net;
    namespace Note_Pss
    public partial class Email : Form
    public Note_Pss.Form1 m_parent;
    Util util = new Util(); string signal = "#";
    char g = System.Convert.ToChar("*");
    char X = System.Convert.ToChar("@");
    Utility_Types utility_type = new Utility_Types(); string P = "";
    char p; String Mailsender; String Npass; String Nsmtp;
    String Mailreceiver; String Mailbody; String MailTitle;
    MailMessage mail = new MailMessage();
    public Email(Note_Pss.Form1 parent)
    InitializeComponent();
    m_parent = parent;
    string ListContent = util.openf(wsk.storagedbase + @"\TemFile");
    wsk.listArray = util.arrayadjust(ListContent, signal);
    private void multi_mail_Send()
    char g = System.Convert.ToChar("*");
    MailParameters();
    int Count_num = wsk.listArray.Count;
    for (int i = 0; i < Count_num; i++)
    string P = wsk.listArray[i].ToString();
    string[] Sub_File = P.Split(g);
    Mailreceiver = Sub_File[2].ToString();
    Nsmtp = "smtp." + msmtp_name(Mailreceiver, "@");
    Send_Mail();
    //if (Enclosure.Text != "") MailAttachment();
    //MailBody();
    private String msmtp_name(string p, string p_2)
    string P = p.ToString();
    string[] Pp = P.Split(X);
    string bbb = Pp[1];
    return bbb;
    private void MailParameters()
    Mailsender = Sender.Text;
    Npass = Senderpass.Text;
    Mailbody = Body.Text;
    MailTitle = Subject.Text;
    private void Send_Mail()
    try
    MailMessage mail = new MailMessage();
    SmtpClient client = new SmtpClient();
    client.Port = 587;
    client.Host = Nsmtp;
    mail.From = new MailAddress(Mailsender);
    mail.To.Add(Mailreceiver);
    mail.Subject = MailTitle;
    mail.Body = Mailbody;
    //SmtpServer.Port = 25;
    //textBox1.Text = Nsmtp + " " + Mailreceiver;
    client.DeliveryMethod = SmtpDeliveryMethod.Network;
    client.UseDefaultCredentials = false;
    client.Credentials = new System.Net.NetworkCredential(Mailsender, Npass);
    client.EnableSsl = true;
    client.Send(mail);
    // MessageBox.Show("mail Send");
    catch (Exception ex) { }
    private void MailSend_Click(object sender, EventArgs e)
    { multi_mail_Send(); }
    private void button2_Click(object sender, EventArgs e)
    { Enclosure.Text = util.openImage(); }
    private void button1_Click(object sender, EventArgs e)
    this.Close();

  • Problem removing folder from Lightroom

    HI,
    I'm new to Lightroom (using 5) and I am trying to get some photo uploads organized. When I imported them, they came in a folder that was poorly organized so I moved them into folders that I preferred. That was fine. BUT now the original folder in lightroom is empty (I deleted from finder after emptying it) and when I remove it from my lightroom ALL the other folders go with it. The funny part is, the total picture count still shows that all the pictures are in lightroom and accounted for, but the folders are no longer there and accessible.
    I have attached a screen shot of the folders. I would like to remove the 2014 folder at the top, but when I do, the desktop folder and everything under it goes as well. Why? And how do i prevent that from happening? THANKS!!
    Ultimately, I would like to move the 2014 folder from being on the desktop as well.
    I

    Your lack of tact was a little bit insulting, regardless of when it happened. No big deal though. I digress.
    Since you cannot view folders in iTunes, you cannot delete folders thru iTunes.
    You could put all the songs you want to delete into a playlist then select all the songs and Command Delete to delete them all at once.
    That's the point. There should be an easier way. But putting them into a playlist before deleting them would be even more work than just deleting them the first time you click them. So this isn't really helpful either.
    Ed's answer was helpful because he addressed the concerns of the original poster. But it also illustrated the need for iTunes programmers to include a feature to remove a folder from your iTunes library as easily as you can add them. If the best way to remove 200GB worth of music from your itunes library is to change the file extensions, then click to delete every single file with an exclamation point next to it; there is quite simply a flaw in design.
    Apple iTunes programmers need to make the adjustment. Right next to the "File" command: "Add folder to library", you could have a command to "Remove folder from library."  Or a "Manage Library" option would be great. Itunes obviously knows what folders it's library consists of so why not allow it to populate a list of them with the option to deselect undesired folders? Why hasn't this been done in one of the numerous iTunes updates? Is it really that hard to understand?

  • Problem calling servlet from within a jsp

    I have a servlet which obtains images for a page
    http://bychance.ca/servlet/ImageServlet?PhotoId=AJ-LA-4008
    I use the servlet from within a jsp
    <img src="servlet/ImageServlet?PhotoId=<%=rs.getObject("ID")%>" border="0">
    for some reason it does not work, the images are never called. I have another servlet which is called the same way and it works fine
    <img src="servlet/ImageServletLarge?PhotoId=<%=strPhotoId%>" border="0">
    Thank you all for your time

    this is my servlet code. Like I said it works fine in another servlet
    rs.next();
    byte[] bytearray = new byte[rs.getInt(1)];
    int size=0;
    InputStream sImage;
    sImage = rs.getBinaryStream(2);
    response.reset();
    response.setContentType("image/jpeg");
    while((size=sImage.read(bytearray))!= -1 )
    response.getOutputStream().write(bytearray,0,size);
    response.flushBuffer();
    sImage.close();

  • Is it possible to trigger the next event from within the event case?

    I have a rather complicated event that is triggered by a change in value of a particular button in the interface. In some cases, I want to alter that button's value when handling other events. But when I do this, the event handling a change in value for that button does not get triggered. Is there a way to make sure the value change event gets handled at the next iteration of the while loop in which the event structure sits?
    Solved!
    Go to Solution.

    Hi Mike,
    Thanks! I was using properties and did not previously know what the value(signaling) was. Knowing this will really help me clean up a lot of redundant code.

  • Problem removing rows from JTable

    Hello,
    I'm having an issue with a JTable that I'm using. At one point in my application, I want to remove all the rows from the table and regenerate them (from a database). When I try to remove the rows and do nothing else, they remain in the table. The rows are being removed from the model, as I have verified this in code, but the display does not refresh at all.
    I am using custom renderers to change the background color of a cell based on its value, and I disabled them to see if that was the problem, but alas, it is not.
    Any suggestions or ideas why this may be occurring?

    I am using model.setRowCount(0); to clear the model, however the display never refreshes. Then you are doing something wrong because its that simple. Only a single line of code is required.
    Perhaps I should have included this in my original post.Actually, you should have included demo code in your original post. That way we don't have to guess what you are doing.
    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 (SSCCE) 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.

Maybe you are looking for