Two JTables changing each others data

I have the following swing setup:
JPanel mainPanel with GridLayout(0, 1)
JPanel tablePanelA with BorderLayout
JPanel tablePanelB with BorderLayout
JTable tableA
JTable tableB
The tables are 2 rows by 7 columns, and are two distinct instances of a class i wrote that extends JTable. They look and act the same, but there are two seperate references. They both use JComboBoxes to allow selectable data in each of the 14 cells.
I then have:
tablePanelA.add(tableA)
tablePanelB.add(tableB)
mainPanel.add(tablePanelA)
mainPanel.add(tablePanelB)
This sets up my main panel with the two tables on it looking how I want it to look. Heres the problem. Whenever I change the data in a cell in either table, the corresponding cell in the other table changes to that same data item also. For example, if i change cell 0,4 in table A to "None", then cell 0,4 in table B will also change to "None". You only see the change on a refresh of the panel, by changing windows to and from the panel, etc. Any ideas on why my tables would be changing each others data?

Any ideas on why my
tables would be changing each others data?It sounds like you're sharing a single TableModel instance between the two tables. When one table updates the model, it fires a TableModelEvent which notifies both JTable instances to update their views.

Similar Messages

  • How do I view two clips overlapping each other, each being semitransparent to see both at the same time, so that I can decide where to stop of the first clip and start of the second clip? Thanks.

    Basically I want to combine to clips with correct timings. For that I want to view the two clips overlapping each other, each being semitransparent to see both at the same time, so that I can decide where to stop of the first clip and start of the second clip? Thanks.

    see my reply in your other post:
    You're familiar with the TRIM-tool?
    http://help.apple.com/finalcutpro/mac/10.1/?lang=en#ver1632caff
    http://help.apple.com/finalcutpro/mac/10.1/?lang=en#ver1632d8e4
    http://help.apple.com/finalcutpro/mac/10.1/?lang=en#ver1632d9ae

  • Link two LRT224 with each other using VPN

    What's the best way to connect two LRT224 with each other, which are in two different citys?
    Open VPN or IPSec?
    I think Gateway to Gateway should be the right mode, but I am very unsure with the lot of settings ...
    Solved!
    Go to Solution.

    Try the EasyLink VPN feature of LRT214/LRT224, which simplifies the site-to-site VPN setup.
    http://kb.linksys.com/Linksys/ukp.aspx?vw=1&docid=03cf456383fc4d958cf918110c7fcd42_How_to_configure_...
    EasyLink VPN works in the following way conceptually.
    1. At the primary site, enable EasyLink VPN Server (inbound tab on the Web GUI) and create an account (username/password) for each remote site.
    2. At a remote site, enable EasyLink VPN Client (outbound tab on the Web GUI), and enters the matching account credentials (username/password).
    3. The remote site will automatically reach out to the primary site to establish an IPsec tunnel.
    Note: LRT224 can support up to five EasyLink VPN peers in a star VPN topology.

  • Hello , I have a shot with two lips kissing each other , how can I keep

    Hello , I have a shot with two lips kissing each other , how can I keep the lips red and turn the rest of the face into black ? I tried shaping but the result was negative because the shape was moving all teh time , I tried color correction but the face and lips`s color was similar so I couldn`t do it with that , is there any other way ? Thanks so much

    You're gonna have fun with this because the HSL qualifiers probably won't see much separation between the areas that you want to isolate. You could try combinations of turning off Hue, Saturation, or Luminance. See what you get.
    Otherwise you're into a roto. (Manually tracked and animated User Shape)
    jPo
    Message was edited by: JP Owens

  • Both disc drives broke within two weeks of each other?

    I bought an imac and macbook pro about a year and a half ago and within two weeks of each other, both have broken. They have always been awkward to insert/eject disc to/from, but now they either don't accept discs in or wont spit them out. Surely this isn't coincidence as they get very different usage from each other. Also, i've just upgraded to 10.6.8. Is this a known problem? Can i request Apple fix these issues for free, as i don't really feel one and a half years is acceptable for the breakdown of both machines, especially as they get very little usage.
    Advice?

    AppleCare covers you for three years.

  • Cannot Align Two Objects On Each Other

    I have done a completely clean install of Creative Cloud CS6 on my mac on Mountain Lion. First time opening Illustrator, and I cannot center two vector objects on each other. Rather, when I click to center them (vertically or horizontally) it actually pushes them further apart! It also appears to be arbitrarily selecting another object on my art board when I select these two (there is no grouping overlap, it makes no sense). I've looked around before, and have 'align to selection' checked, and 'snap to grid/snap to point' unchecked in the 'view' dropdown. Going to try to trash my preferences, but this is literally the first time I've opened it, so I can't see how that would be an issue!
    I use this tool CONSTANTLY in what I do, so this is really troubling. Has anyone had a similar problem and fixed it? Thanks so much!!

    I held down Option+Command+Shift while opening Illustrator (as offered in another thread as a way to trash/reset preferences). I know it did this as I had changed the color scheme to light grey, and it's back to dark grey.
    Opened up original file. Now, I can center things horizontally alright, but vertically jumped the both of them way down the page.
    Created a new file. Could center horizontally, centering vertically did absolutely nothing—no jumping down the page, no doing what it should be doing...nada.

  • Can these two attributes conflict each other?

    A Data Guard question: Can MAX_FAILURE and NET_TIMEOUT attributes conflict each other if we configure them simultaneously on a same LOG_ARCHIVE_DEST destination?
    Is there any overlap to them?

    Is it easier to ask someone else to look up the
    answer for you than to look it up yourself?
    http://www.oracle.com/pls/db111/homepage
    I encourage you to read it for yourself. You might
    just learn something else of value.
    Read the Doc - A Poem
    I need a guru who can do
      In one statement - a line or two,
    To write for me the fix i need
      to make me a hero, o yes indeed.
    I hack and I paste, can't show my true code
      But using your powers I'm sure you will know
    What is my issue, time is flying -  Tick-Tock...
      What do you mean, just go read the doc? RTFM - right? ;}

  • Two iphones  receiving each others text massages

    I have two iphones synced to the same computer receiving each others text massages, how do I fix it?

    On each phone go to Settings > Messages > Send and Receive and select only the phone number of the phone in question. Each phone should have only its own number selected. F each phone has its own unique email address you can select that as well. But do not select any phone number or email address that resides on a different phone.

  • Parallelly scrolling two list with each other.

    Hi All,
    I am new in windows phone 8 development. MY issue is i want to scroll two list simultaneously with other. Means if i scroll first list then other list should be scroll parallelly with first list ,so that we can display data of same index of both list parallelly.
    How can achieve this in windows phone 8.
    In Android and Iphone they are able to do this features. 
    Please help me.
    Thanks in advance.

    Thanks Vineet for your response.
    Can you please show me your xaml code where i have to put scrollviewer in listbox. I am unable to scroll second list with first list. My xaml code is below for first listbox.
    <ListBox Grid.Row="1" Background="#1D1C1A" Name="lstChannelList" VerticalAlignment="Top" ItemsSource="{Binding}"
    ScrollViewer.VerticalScrollBarVisibility="Visible" SelectionChanged="lstChannelList_SelectionChanged" LayoutUpdated="lstChannelList_LayoutUpdated" >
    <ListBox.ItemTemplate>
    <DataTemplate>
    <ScrollViewer VerticalAlignment="Top" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Disabled" >
    <StackPanel Orientation="Horizontal">
    <Grid Margin="0,0,3,0" Grid.Row="0" Background="{Binding color}" >
    <Grid.RowDefinitions>
    <RowDefinition Height="60"/>
    <RowDefinition Height="5"/>
    </Grid.RowDefinitions>
    <Grid.ColumnDefinitions>
    <ColumnDefinition Width="50"/>
    <ColumnDefinition Width="10*"/>
    </Grid.ColumnDefinitions>
    <TextBlock VerticalAlignment="Center" Grid.Row="0" Grid.Column="0" Text="{Binding number}" Foreground="{Binding forcolor}" FontWeight="Bold"/>
    <TextBlock VerticalAlignment="Center" Grid.Row="0" Grid.Column="1" Text="{Binding channel_name}" Foreground="White" HorizontalAlignment="Left"/>
    <StackPanel Grid.Row="1" Grid.ColumnSpan="2" Background="Gray" Width="800" Height="3"/>
    </Grid>
    </StackPanel>
    </ScrollViewer>
    </DataTemplate>
    </ListBox.ItemTemplate>
    <ListBox.ItemContainerStyle>
    <Style TargetType="ListBoxItem">
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    </Style>
    </ListBox.ItemContainerStyle>
    </ListBox>
    and second list xaml are below.second list data are static.
    <ListBox Grid.Row="1" Background="#1D1C1A" Name="lstChannel" VerticalAlignment="Top" ItemsSource="{Binding}"
    ScrollViewer.VerticalScrollBarVisibility="Visible" >
    <ListBox.ItemTemplate>
    <DataTemplate>
    <ScrollViewer VerticalAlignment="Top" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Disabled" Width="480">
    <StackPanel Orientation="Vertical">
    <Grid Margin="0,0,3,0" Grid.Row="0" Background="{Binding forcolorside}">
    <Grid.RowDefinitions>
    <RowDefinition Height="60"/>
    <RowDefinition Height="5"/>
    </Grid.RowDefinitions>
    <Grid.ColumnDefinitions>
    <ColumnDefinition Width="3"/>
    <ColumnDefinition Width="1*"/>
    <ColumnDefinition Width="3"/>
    <ColumnDefinition Width="1*"/>
    <ColumnDefinition Width="3"/>
    <ColumnDefinition Width="1*"/>
    <ColumnDefinition Width="3"/>
    <ColumnDefinition Width="1*"/>
    <ColumnDefinition Width="3"/>
    <ColumnDefinition Width="1*"/>
    <ColumnDefinition Width="3"/>
    <ColumnDefinition Width="1*"/>
    <ColumnDefinition Width="3"/>
    </Grid.ColumnDefinitions>
    <StackPanel Background="Gray" Grid.Row="0" Grid.Column="0" HorizontalAlignment="Right" Width="3" />
    <Grid Grid.Row="0" Grid.Column="1" Background="{Binding forcolorside}">
    <TextBlock VerticalAlignment="Center" Text="Pluto pick's 2014" Foreground="White" TextTrimming="WordEllipsis" HorizontalAlignment="Left"/>
    </Grid>
    <StackPanel Background="Gray" Grid.Row="0" Grid.Column="2" HorizontalAlignment="Right" Width="3" />
    <StackPanel Orientation="Horizontal" Grid.Row="0" Grid.Column="3" Background="{Binding forcolorside}">
    <TextBlock VerticalAlignment="Center" Text="Pluto pick's 2014" Foreground="White" TextTrimming="WordEllipsis" HorizontalAlignment="Left"/>
    </StackPanel>
    <StackPanel Background="Gray" Grid.Row="0" Grid.Column="4" HorizontalAlignment="Right" Width="3" />
    <Grid Grid.Row="0" Grid.Column="5" Background="{Binding forcolorside}">
    <TextBlock VerticalAlignment="Center" Text="Pluto pick's 2014" Foreground="White" TextTrimming="WordEllipsis" HorizontalAlignment="Left"/>
    </Grid>
    <StackPanel Background="Gray" Grid.Row="0" Grid.Column="6" HorizontalAlignment="Right" Width="3" />
    <Grid Grid.Row="0" Grid.Column="7" Background="{Binding forcolorside}">
    <TextBlock VerticalAlignment="Center" Text="Pluto pick's 2014" Foreground="White" TextTrimming="WordEllipsis" HorizontalAlignment="Left"/>
    </Grid>
    <Grid Background="Gray" Grid.Row="0" Grid.Column="8" HorizontalAlignment="Right" Width="3" />
    <Grid Grid.Row="0" Grid.Column="9" Background="{Binding forcolorside}">
    <TextBlock VerticalAlignment="Center" Text="Pluto pick's 2014" Foreground="White" TextTrimming="WordEllipsis" HorizontalAlignment="Left"/>
    </Grid>
    <Grid Background="Gray" Grid.Row="0" Grid.Column="10" HorizontalAlignment="Right" Width="3" />
    <StackPanel Orientation="Horizontal" Grid.Row="0" Grid.Column="11" Background="{Binding forcolorside}">
    <TextBlock VerticalAlignment="Center" Text="Pluto pick's 2014" Foreground="White" TextTrimming="WordEllipsis" HorizontalAlignment="Left"/>
    </StackPanel>
    <Grid Background="Gray" Grid.Row="0" Grid.Column="12" HorizontalAlignment="Right" Width="3" />
    <StackPanel Grid.Row="1" Grid.ColumnSpan="13" Background="Gray" Width="500" Height="3"/>
    </Grid>
    </StackPanel>
    </ScrollViewer>
    </DataTemplate>
    </ListBox.ItemTemplate>
    <ListBox.ItemContainerStyle>
    <Style TargetType="ListBoxItem">
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    </Style>
    </ListBox.ItemContainerStyle>
    </ListBox>
    Both list have six rows. and second list i am displaying above first list. So i want to parallelly rotate item of both list if any list scrolling. Please show me your XAML.
    I am unable to scroll second list if first list is scrolling above.
    Thanks once again vineet.

  • Compiling simultaneously two classes referencing each other

    Hi,
    When we want to compile 2 classes simultaneously in a package, we give command --
    javac package-name/*.java
    Suppose the two classes are ClassA and ClassB and ClassA has a reference of ClassB. So the compiler will finish compiling ClassB before compiling ClassA.
    But, if both the classes have each others' reference, how does compiler resolve this? Because, even in that case both classes get compiled
    Regards,
    Amit

    Lets say that compilation is done in 2 steps.
    The first step is done for all files first.
    Then the second step is done for all files.
    That means that for the second step the compile-time resolution has takes place.
    Two classes that refers to each other must go through the first step in
    the same compilation so that in the second step when
    they are referring to each other they are easily resolved.
    This is different from runtime resolution.

  • Can two functions call each other?

    I'm converting some code and have run into two functions that call each other. While I seem to have converted both functions to plsql ok, they do not compile, seemingly because they ref each other. As soon as I de-reference one one function's call to the other function they both compile.
    I know that Oracle 10g supports recursion; and on the surface of things, this situation does not seem much different than recursion. If both functions are well formed, I would hope that they'd compile.
    I wasn't able to find much by searching the forums on this topic...but I'm hoping that someone will have some info on this issue.

    what happens when f2 sends 2 as parameter to f1 (i mean F1(2) in place of f1(1) ) at line 6 of f2).probably that what you expected ;) :
    SQL>  create or replace function f1 (i integer default 0)
         return integer
    as
    begin
         dbms_output.put_line ('In function f1');
         return case when i != 1 then f2 end;
    end f1;
    Warning: compiled but with compilation errors
    SQL>  show error
    Errors for FUNCTION F1
    LINE/COL ERROR                                                           
    6/31     PLS-00201: identifier 'F2' must be declared                     
    6/2      PL/SQL: Statement ignored                                       
    SQL>  create or replace function f2
         return integer
    as
         i integer;
    begin
         dbms_output.put_line ('In function f2');
         execute immediate 'begin :1 := f1(2); end;' using out i;
         return i;
    end f2;
    Createfunction successfully completed.
    SQL>  select f2() from dual
    select f2() from dual
    Error at line 1
    ORA-00036: maximum number of recursive SQL levels (50) exceeded
    ORA-06512: at "MICHAEL.F2", line 8
    ORA-06512: at "MICHAEL.F1", line 6
    ORA-06512: at line 1
    ORA-06512: at "MICHAEL.F2", line 8
    ORA-06512: at "MICHAEL.F1", line 6
    ORA-06512: at line 1
    ORA-06512: at "MICHAEL.F2", line 8
    ORA-06512: at "MICHAEL.F1", line 6
    ORA-06512: at line 1
    ORA-06512: at "MICHAEL.F2", line 8
    ORA-06512: at "MICHAEL.F1", line 6
    ORA-06512: at line 1
    ORA-06512: at "MICHAEL.F2", line 8
    ORA-06512: at "MICHAEL.F1", line 6
    ORA-06512: at line 1
    ORA-06512: at "MICHAEL.F2", line 8
    ORA-06512: at "MICHAEL.F1", line 6
    ORA-06512: at line 1
    ORA-06512: at "MICHAEL.F2", line 8
    ORA-06512: at "MICHAEL.F1", line 6
    ORA-06512: at line 1
    ORA-06512: at "MICHAEL.F2", line 8
    ORA-06512: at "MICHAEL.F1", line 6
    ORA-06512: at line 1
    ORA-06512: at "MICHAEL.F2", line 8
    ORA-06512: at "MICHAEL.F1", line 6
    ORA-06512: at line 1
    ORA-06512: at "MICHAEL.F2", line 8
    ORA-06512: at "MICHAEL.F1", line 6
    ORA-06512: at line 1
    ORA-06512: at "MICHAEL.F2", line 8

  • Two iviews calling each other on a single page?

    Hi all,
    Does anyone know of any documentation or how you would be able to have two views on a page with one iview displaying the onclick action of another iview? 
    Currently everytime a user would click a link on this iview it displays it onto another window.  We would like it to be displayed in another iview in the same page.
    Thanks,
    Jin Bae

    Hi NAC,
    here the same holds, EPCF (Event API). It is just thought for seperate iViews, nothing else does make sense.
    > One taking in input from the user,
    > calling a Database and displaying
    > the Result on the other iView.
    If you have a server roundtrip in between, in this case it might make more sense to use JSPFragments or programatically include the result display within the same iView.
    If you don't want this, you still have the possibility to pass the data on client side (not advisable for complex data) or to share it on server side (HttpSession) and on client side to refresh the result display iView via an EPCF event.
    The "standard" way anyhow would be to pass the selection data from iV1 to iV2 and have this second iView to make the DB access and in return displaying the result.
    Hope it helps
    Detlev

  • How do you set up multiple accounts in itunes so phones don't automatically sync each others data ?

    How do you set up multiple itunes accounts to prevent multiple phones from sharing contact data?

    To add to Rod's answer, I have been blogging to explain more in detail the work flows for Question and Score slides, and some tweaking possibilities in these articles:
    http://lilybiri.posterous.com/question-question-slides-in-captivate
    http://lilybiri.posterous.com/question-question-slides-part-2
    Lilybiri

  • Two Objects Following Each Other While Maintaining Minimum Distance

    Hello,
    I'm trying to solve a problem where I have one circle following another ( the first following the mouse ), yet maintain a minimum distance between the two circles.
    The code is pretty simple. For the lead circle I'm moving it as follows on the movement of the mouse:
    circle.x = event.stageX + 8.000000E-001 * ( circle.x - event.stageX );
    circle.y = event.stageY + 8.000000E-001 * ( circle.y - event.stageY );
    Then I'm moving the secondary circle as:
    circle2.x = circle.x + 8.000000E-001 * ( circle2.x - circle.x );
    circle2.y = circle.y + 8.000000E-001 * ( circle2.y - circle.y );
    This works remarkably well, however, I want to be able to increase the distance between the two circles and enforce a minimum. If anyone can point me in the right direction I'd appreciate the assistance. Thanks.

    Thanks for responding. To what are you referencing that I increase by .008, not following? Thanks.

  • How to compare two strings with each other?

    Hello,
    I have modeled a formular which has a radio group and a button. Furthermore, I have one result state corresponding to each option in the radio group.
    In order to determine which result state actually is to be reached I want to attach a condition to each flow to the result states that tests which option has been chosen.
    Which operator can I use for writing these conditions? I have tried the "like" operator as well as the "==" operator but neither seems to work.
    I have written something like:
    =LIKE(@decision, 'option a')
    as well as:
    =(@decision=='option a')
    What am I doing wrong here?
    Thank you very much
    Alexander

    Hi Alexander,
    Could this be an Upper/Lower case issue.
    I tried the following expression
    =(@TXT1=="opt a")
    and it worked.
    If you want your expression to ignore case you should use this expression:
    =(UPPER(@TXT1)==UPPER("opt a"))
    In case you're not sure what is the exact string in the field (@decision) you can always use the PROMPT action to display the field's value.
    Regards,
    Udi

Maybe you are looking for

  • How do I dynamically open a VI and load values into its connector pane?

    I'm trying to open a VI as a prompt to another VI without opening the second VI's front panel until the user clicks OK in the first window. The second VI takes inputs from the first thru its connector pane. How do I dynamically open the second VI?

  • Nokia strips out speed camera warnings from the Ma...

    On both my 808s I have just realised the audio warnings have stopped totally. There was a recent maps update. I did an update check and it said that the whole lot (3GB in my case) needed updating, so I did it. That was probably a bad idea, because it

  • Adobe 9 crashes or faults on Windows Vista Business

    Running Vista Business, keeps getting these when opening PDF's. I have all the updates for my OS and for Adobe 9. Log Name:      Application Source:        Application Error Date:          9/30/2008 1:28:26 AM Event ID:      1000 Task Category: (100)

  • Validation rules - long time of promotion

    Hi guys, We have verry big problem that we need to resolve as soon as possible. On almost every form (we have about 100 of them) we have validation rules (on some even three or four rules). Every rule checks some values on form, and do not let users

  • Help :  I cant use my caps lock

    My cat walked my keyboard. Then  my problem started. I can not hide keyboard & Cahracter Viewers in menu bar. So I cant use caps lock key. I tried to reset,,,  but did not work. Please advise me...  :-(