How to populate change from one Table cell to more Tables??

Dear Friends:
I have following successfully running code, each can populate 1 table cell updating in ChangeTableSelectionMain1 change to another table in ChangeTableSelectionMain1 also, or populate 1 table cell in ChangeTableSelectionSub1 change to another table in ChangeTableSelectionSub1 also, But cannot populate table cell updating in ChangeTableSelectionMain1 to ChangeTableSelectionSub1, Please advice how to make populating table cell updating in ChangeTableSelectionMain1 to ChangeTableSelectionSub1 successful??
Thanks.
[1]. main code:
package com.com;
import java.awt.BorderLayout;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JSplitPane;
import java.awt.GridLayout;
public class ChangeTableControl1 implements java.io.Serializable{
     private JFrame                frame;
     public static void main(String args[]) {
          try {
               ChangeTableControl1 window = new ChangeTableControl1();
               window.frame.setVisible(true);
          } catch (Exception e) {
               e.printStackTrace();
      * Create the application
     public ChangeTableControl1() {
          initialize();
      * Initialize the contents of the frame
     private void initialize() {
          frame = new JFrame();
          frame.setBounds(0, 0, 1500, 675);
          final ChangeTableSelectionMain1      c1      = new ChangeTableSelectionMain1();
          final ChangeTableSelectionSub1           c2      = new ChangeTableSelectionSub1();
          JSplitPane sp = new JSplitPane();          
          frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          final JPanel panel = new JPanel();
          panel.setLayout(new GridLayout(1, 2));
          frame.getContentPane().add(panel, BorderLayout.CENTER);
          sp.setLeftComponent(c1);
          sp.setRightComponent(c2);
          sp.setResizeWeight(0.5);
          panel.add(sp);// add right part
            frame.addWindowListener(new WindowAdapter() {
                 public void windowClosing(WindowEvent e) {
                     System.exit(0);
             frame.pack();
             frame.setVisible(true);
}[2]. ChangeTableSelectionSub1
package com.com;
import javax.swing.JTable;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
import javax.swing.event.TableModelEvent;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import java.awt.FlowLayout;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.*;
import java.awt.event.*;
import java.util.*;
import java.io.*;
import java.text.SimpleDateFormat;
import javax.swing.*;
import javax.swing.border.*;
import javax.swing.event.*;
import javax.swing.table.*;
import java.awt.BorderLayout;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JTable;
public class ChangeTableSelectionSub1 extends JPanel{
       protected         JButton                bt11 = new JButton("Insert before");
       protected         JButton                bt22 = new JButton("Insert after");
       protected         JButton                bt33 = new JButton("Delete");
       protected      ChangeTableSelectionMain1 lm = new ChangeTableSelectionMain1();
public ChangeTableSelectionSub1() {
     JPanel pnl = new JPanel();
     pnl.setMinimumSize(new Dimension(200,600));
          //pnl.setPreferredSize(new Dimension(800,600));
          final JTable tbl1 = new JTable(lm.data,lm.columnNames);
          final JTable tbl2 = new JTable(lm.data,lm.columnNames);
          JScrollPane scr1 = new JScrollPane(tbl1);
          JScrollPane scr2 = new JScrollPane(tbl2);
          lm.tbl1.getSelectionModel().addListSelectionListener(new ListSelectionListener()
          public void valueChanged(ListSelectionEvent lse)
               if (lm.tbl1.getSelectedRow()!=-1)
                    tbl2.clearSelection();
                    System.out.print("[1]. LongguChangeTableSelectionSub get msg from LongguChangeTableSelectionMain");
                    tbl1.clearSelection();
                    revalidate();
          lm.tbl2.getSelectionModel().addListSelectionListener(new ListSelectionListener()
     public void valueChanged(ListSelectionEvent lse)
          if (tbl2.getSelectedRow()!=-1)
               tbl1.clearSelection();
          System.out.print("[2]. LongguChangeTableSelectionSub get msg from LongguChangeTableSelectionMain");
          revalidate();
     pnl.setLayout(new FlowLayout());
     pnl.add(scr1);
     pnl.add(scr2);
     this.add(pnl);
public static void main(String []args)
     ChangeTableSelectionSub1 c = new ChangeTableSelectionSub1();
     JFrame frm = new JFrame();
     frm.setSize(920,400);
     frm.getContentPane().add(c);
     frm.setVisible(true);
}[3]. ChangeTableSelectionMain1
package com.com;
import javax.swing.JTable;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
import javax.swing.JScrollPane;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import java.awt.FlowLayout;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.*;
import javax.swing.*;
public class ChangeTableSelectionMain1 extends JPanel{
       protected         JButton                bt11 = new JButton("Insert before");
       protected         JButton                bt22 = new JButton("Insert after");
       protected         JButton                bt33 = new JButton("Delete");
       protected String[] columnNames = {"First Name",
                    "Last Name",
                    "Sport",
                    "# of Years",
                    "Vegetarian"};
       protected Object[][] data = {
          {"Mary", "Campione","Snowboarding", new Integer(5), new Boolean(false)},
          {"Alison", "Huml","Rowing", new Integer(3), new Boolean(true)},
          {"Kathy", "Walrath","Knitting", new Integer(2), new Boolean(false)},
          {"Sharon", "Zakhour","Speed reading", new Integer(20), new Boolean(true)},
          {"Philip", "Milne","Pool", new Integer(10), new Boolean(false)} };
       protected JTable tbl1 = new JTable(data,columnNames);
       protected JTable tbl2 = new JTable(data,columnNames);
public ChangeTableSelectionMain1() {
     JPanel pnl = new JPanel();
     pnl.setMinimumSize(new Dimension(200,600));
          //pnl.setPreferredSize(new Dimension(800,600));
          JScrollPane scr1 = new JScrollPane(tbl1);
          JScrollPane scr2 = new JScrollPane(tbl2);
          tbl1.getSelectionModel().addListSelectionListener(new ListSelectionListener()
          public void valueChanged(ListSelectionEvent lse)
               if (tbl1.getSelectedRow()!=-1)
                    tbl2.clearSelection();
               if (lse.getValueIsAdjusting())
                   System.out.println("Selected from " + lse.getFirstIndex() + " to " + lse.getLastIndex());
               revalidate();             
          tbl2.getSelectionModel().addListSelectionListener(new ListSelectionListener()
     public void valueChanged(ListSelectionEvent lse)
          if (tbl2.getSelectedRow()!=-1)
               tbl1.clearSelection();
               revalidate();
     pnl.setLayout(new FlowLayout());
     pnl.add(scr1);
     pnl.add(scr2);
     this.add(pnl);
public static void main(String []args)
     ChangeTableSelectionMain1 c = new ChangeTableSelectionMain1();
     JFrame frm = new JFrame();
     frm.setSize(920,400);
     frm.getContentPane().add(c);
     frm.setVisible(true);
}Message was edited by:
sunnymanman

I have following successfully running code, each can populate 1 table cell updating in ChangeTableSelectionMain1 change to another table in ChangeTableSelectionMain1 also, or populate 1 table cell in ChangeTableSelectionSub1 change to another table in ChangeTableSelectionSub1 also, But cannot populate table cell updating in ChangeTableSelectionMain1 to ChangeTableSelectionSub1, Please advice how to make populating table cell updating in ChangeTableSelectionMain1 to ChangeTableSelectionSub1 successful??
My brain hurts, does yours?

Similar Messages

  • UIX- How to populate values from one view to the other- JDev10.1.2

    Hi,
    I have an enquiries table shown in a uix page.
    Once a user selects a particular enquiry, some of the details should be passed on to the Student Master table which is on a seperate UIX page.
    Could some one tell me how to achieve this.

    This is way my pages are displaying when i select first row "mady" another page display detail but not showing anything but when i click back navigation it shows that selected row on list page...
    see my code i have posted... i think i missed something....please help me!!

  • How do i change from one ipod to another? both ipods have music on them, and different cpu's.

    I have an old Touch with it's data on my laptop, my dad just got the new one with his data on his laptop. he told me if i can switch over the music and stuff then i can have his ipod. So, how would i put my songs onto his ipod and his songs onto my ipod?

    I wasn't intending to move the entire home folder, rather, moving things like what's inside my Documents folder in chunks.
    From what I read, tracking down the origin of sleep/wake problems on a computer is notoriously hard, especially if Disk Utility and similar tools don't give any clues during Repair Disk or Repair Permissions. Creating the new user seemed to help, but I don't know why that alone would "fix" anything, so I haven't moved any files as of yet nor done anything with the new user account.
    Trying to move the things from my Library folder to my desktop also seems a bit risky; it's hidden in Lion and Mountain Lion because a lot of system files are there, right? Wouldn't moving them cause problems, not just help me find what file/folder (if any) could be the culprit?

  • Re: How can I change from one subscription to anot...

    I understand that. 
    But my question was "How can I transfer the money / credit that was paid for the subscription and use that as credits instead?
    My mom purchased the subscription no more than an hour ago and has not made a single call with it b/c it does not call mobiles. So what she needs is to have that amount issued as a credit.
    Your response suggested the obvious "Cancel the Subscription" and after reading the money threads on this forum about recurring billing, I will certainly be sure to do this so. However, cancelling that subscription means I've just paid Skype 13.99US. 
    The second part of your suggestion then said to purchase the credit - a minimum of $10. 
    Is there not a more reasonable solution for paying customers? The credits will be used. It's not like I'm asking for a refund - I'm simply asking if we can apply that purchase to credits and not a subscription.

    You need to cancel the first Subscription by filing with Customer Service and then purchase the new one.
    TIME ZONE - US EASTERN. LOCATION - PHILADELPHIA, PA, USA.
    I recommend that you always run the latest Skype version: Windows & Mac
    If my advice helped to fix your issue please mark it as a solution to help others.
    Please note that I generally don't respond to unsolicited Private Messages. Thank you.

  • How do you change from one apple Id to another person.

    I got a new iPad from my mom and she was sign in, so I sign her out, but none of my songs are coming up on iTunes. What happened when you do the erase all the setting, does it erase everything on my iPad.

    The pad works with a single user.  If you are now that user, reset the pad from scratch.  Settings, reset, erase all content and settings.  Then sync it to your computer using your I tunes account.  Her apps will be gone, and your stuff will be available.

  • [Forum FAQ] How to configure a Data Driven Subscription which get multi-value parameters from one column of a database table?

    Introduction
    In SQL Server Reporting Services, we can define a mapping between the fields that are returned in the query to specific delivery options and to report parameters in a data-driven subscription.
    For a report with a parameter (such as YEAR) that allow multiple values, when creating a data-driven subscription, how can we pass a record like below to show correct data (data for year 2012, 2013 and 2014).
    EmailAddress                             Parameter                      
    Comment
    [email protected]              2012,2013,2014               NULL
    In this article, I will demonstrate how to configure a Data Driven Subscription which get multi-value parameters from one column of a database table
    Workaround
    Generally, if we pass the “Parameter” column to report directly in the step 5 when creating data-driven subscription.
    The value “2012,2013,2014” will be regarded as a single value, Reporting Services will use “2012,2013,2014” to filter data. However, there are no any records that YEAR filed equal to “2012,2013,2014”, and we will get an error when the subscription executed
    on the log. (C:\Program Files\Microsoft SQL Server\MSRS10_50.MSSQLSERVER\Reporting Services\LogFiles)
    Microsoft.ReportingServices.Diagnostics.Utilities.InvalidReportParameterException: Default value or value provided for the report parameter 'Name' is not a valid value.
    This means that there is no such a value on parameter’s available value list, this is an invalid parameter value. If we change the parameter records like below.
    EmailAddress                        Parameter             Comment
    [email protected]         2012                     NULL
    [email protected]         2013                     NULL
    [email protected]         2014                     NULL
    In this case, Reporting Services will generate 3 reports for one data-driven subscription. Each report for only one year which cannot fit the requirement obviously.
    Currently, there is no a solution to solve this issue. The workaround for it is that create two report, one is used for view report for end users, another one is used for create data-driven subscription.
    On the report that used create data-driven subscription, uncheck “Allow multiple values” option for the parameter, do not specify and available values and default values for this parameter. Then change the Filter
    From
    Expression:[ParameterName]
    Operator   :In
    Value         :[@ParameterName]
    To
    Expression:[ParameterName]
    Operator   :In
    Value         :Split(Parameters!ParameterName.Value,",")
    In this case, we can specify a value like "2012,2013,2014" from database to the data-driven subscription.
    Applies to
    Microsoft SQL Server 2005
    Microsoft SQL Server 2008
    Microsoft SQL Server 2008 R2
    Microsoft SQL Server 2012
    Please click to vote if the post helps you. This can be beneficial to other community members reading the thread.

    For every Auftrag, there are multiple Position entries.
    Rest of the blocks don't seems to have any relation.
    So you can check this code to see how internal table lt_str is built whose first 3 fields have data contained in Auftrag, and next 3 fields have Position data. The structure is flat, assuming that every Position record is related to preceding Auftrag.
    Try out this snippet.
    DATA lt_data TYPE TABLE OF string.
    DATA lv_data TYPE string.
    CALL METHOD cl_gui_frontend_services=>gui_upload
      EXPORTING
        filename = 'C:\temp\test.txt'
      CHANGING
        data_tab = lt_data
      EXCEPTIONS
        OTHERS   = 19.
    CHECK sy-subrc EQ 0.
    TYPES:
    BEGIN OF ty_str,
      a1 TYPE string,
      a2 TYPE string,
      a3 TYPE string,
      p1 TYPE string,
      p2 TYPE string,
      p3 TYPE string,
    END OF ty_str.
    DATA: lt_str TYPE TABLE OF ty_str,
          ls_str TYPE ty_str,
          lv_block TYPE string,
          lv_flag TYPE boolean.
    LOOP AT lt_data INTO lv_data.
      CASE lv_data.
        WHEN '[Version]' OR '[StdSatz]' OR '[Arbeitstag]' OR '[Pecunia]'
             OR '[Mita]' OR '[Kunde]' OR '[Auftrag]' OR '[Position]'.
          lv_block = lv_data.
          lv_flag = abap_false.
        WHEN OTHERS.
          lv_flag = abap_true.
      ENDCASE.
      CHECK lv_flag EQ abap_true.
      CASE lv_block.
        WHEN '[Auftrag]'.
          SPLIT lv_data AT ';' INTO ls_str-a1 ls_str-a2 ls_str-a3.
        WHEN '[Position]'.
          SPLIT lv_data AT ';' INTO ls_str-p1 ls_str-p2 ls_str-p3.
          APPEND ls_str TO lt_str.
      ENDCASE.
    ENDLOOP.

  • How to populate data from table into datagrid in form

    hi there. may i know how to populate data from a table into a datagrid? i have created a datagrid in a form using OLE's microsoft datagrid. i'm having problem to populate data from table into the grid. can i know how to do that? thanks

    Not exactly. I want to enter input from form and the user can have all options to choose i.e. HIGH, MEDIUM or so on.
    Suppose, you have option to select HIGH, MEDIUM or LOW and you can see all these options together. You select LOW and when you save, it is saves in the table as a value. So when you view the table again, it will show LOW as active and HIGH and MEDIUM are null.

  • How to scan data from one internal table to another

    Hi All,
    let me know how to scan all from one internal table to another internal table. Pls provide me the syntax and code.
    i am very thankful to you all in advance.
    Thanks & Regards,
    Nagarjuna.

    if u want to copy data from itab1 to itab2  then use
    itab2[] = itab1[].
    if u want to compare whether both itab1 and itab2 are same or not,use
    if itab1[] = itab2[].
    *--same
    else.
    *--not same
    endif.
    if u want to compare itabs based on primary key....
    loop at itab1.
    read table itab2 with key f1 = itab1-f1.
    if sy-subrc <> 0.
    *--not same....
    endif.
    endloop.
    if u want to copy only few lines(say from 1 to 3) of itab1 to itab2 then use...
    append lines of itab1 from 1 to 3 to itab2.
    if internal tables don't have same structure,
    say only fields f1 and f2 are common,then
    loop at itab1.
    itab2-f1 = itab1-f1.
    itab2-f2 = itab1-f2.
    append itab2.
    clear itab2.
    endloop.
    if there are many common fields then...
    loop at itab1.
    move-corresponding itab1 to itab2.
    append itab2.
    clear itab2.
    endloop.
    Please don't forget to reward points....!!!
    Regards
    vasu

  • How to create a table cell occupy more than one row using PDF.

    Hi,
    I want create a pdf report,which contains a table cell occupied more than one line.
    just like html language: <rowspan = 2>
    merge cells in one row is allowed,we can use merge cells command(like colspan in html).
    but how to mege cells in one column?

    Hi,
    I want create a pdf report,which contains a table cell occupied more than one line.
    just like html language: <rowspan = 2>
    merge cells in one row is allowed,we can use merge cells command(like colspan in html).
    but how to mege cells in one column?

  • How to publish infopath list form changes from one environment to another

    How can we move InfoPath customized list form changes from one environment to another example Development environment to UAT environment? We can save that as source file and update url on the .xsn file. But is there any other way we can do it?
    Rajasekar A.C

    Hi,
    You can save the list as template in source environment. Download the template for List Templates, upload in the same location in Destination site. The customized infopath should go with it. Let us know if that doesnt work.
    Regards, Kapil ***Please mark answer as Helpful or Answered after consideration***

  • How do I change from having a credit card to not having one on my iTunes?

    How do I change from having a credit card to not having one on iTunes? It's not giving me the option

    The "none" option will not be available if you owe a balance on your iTunes Store account, and may not be available even then.
    If you are certain you don't owe Apple anything then contact iTunes Store Support and ask them the reason.

  • How can I change from useing an english keyboard to a French one

    how can I change from english to french

    Take your stylus and tap and hold on the analog clock and you will get a drop down list with two choices analog or digital. Choose digital.
    Post relates to: Centro (Sprint)

  • OBIEE 11g How to pass variable from one prompt to another prompt in dashboard page.

      How to pass variable from one prompt to another prompt in dashboard page.
    I have two prompt in dashboard page as below.
    Reporttype
    prompt: values(Accounting, Operational) Note: values stored as
    presentation variable and they are not coming from table.
    Date prompt values (Account_date, Operation_date)
    Note:values are coming from dim_date table.  
    Now the task is When user select First
    Prompt value  “Accounting” Then in the
    second prompt should display only Accounting_dates , if user select “operational”
    and it should display only operation_dates in second prompt.
    In order to solve this issue I made the
    first prompt “Reporttype” values(Accounting, Operational) as presentation
    values (custom specific values) and default presentation value is accounting.
    In second prompt Date are coming from
    dim_date table and I selected Sql results as shown below.
    SELECT case when '@{Reporttype}'='Accounting'
    then "Dates (Receipts)"."Acct Year"
    else "Dates (Receipts)"."Ops
    Year"  End  FROM "Receipts"
    Issue: Presentation variable value is not
    changing in sql when user select “operation” and second prompt always shows
    acct year in second prompt.
    For testing pupose I kept this presentation
    variable in text object of dashboard and values are changing there, but not in
    second prompt sql.
    Please suggest the solution.

    You will want to use the MoveClipLoader class (using its loadClip() and addListener() methods) rather than loadMovie so that you can wait for the file to load before you try to access anything in it.  You can create an empty movieclip to load the swf into, and in that way the loaded file can be targeted using the empty movieclip instance name.

  • How to transfer parameters from one ivew to another-both are in diff. page

    Hi All,
    My requirment is pass the parametrs from one ivew to another ivew(both are different PCD paths). now i am able to see the value in second ivew using java script .Here my problem is come.
    How to transfer varibles from one i vew to another ---Afetr seeing so many forums in SDN.I came to know that EPCM is Best. Using EPCM i am able to transfer the varible and able see the vlues in javascripts(Using alert command).
    From java script how to transfer varible to bean-----afetr seeing forums i came to know that using HTTPSession we can pass parameters to bean. but i am unable to code where i need to call httpsession api methods,it mean that i need to code under  java script , JSp and controller page.
    it is very urgent for me,
    thanqs in advance

    Hi,
    Goto LT01 transaction with Movment type = 999 and stock category = Required stock category. Create a PCN and process the remaining process so as to change the stock type.
    Regards,
    Dilli Babu R

  • Why do a change from one OSX version to another OSX version?

    It seems to me that Mavericks OSX is NOT an upgrade.  It seems like it is a side-grade since I would still be using OSX, just a side to side change….  The first response noted that some people  have difficulty with iPhoto after doing a side to side change to Maverick.  I use iPhoto all the time, don't want any problems with that… and another said that the Time Machine backup no longer worked after the change from OSX (Mountain Lion_ to OSX Mavericks)…  That is my backup program and I certainly don't want any problems with that.  So my ? remains…. why do a side to side change from one OSX to another OSX version???  The answers received are not answering that ?.
    Your replys and comments are appreciated.

    The reasons for upgrading are:
    - Security (there are a myriad of behind-the-scenes security improvements, and some foreground improvements in programs and system services)
    - Service compatibility (ie, syncing services like iCloud)
    - Application Compatibility (as programs develop, they will drop support for prior versions of OS X).
    - Latest and greatest features, if you find them useful.
    - Hardware compatibility, with peripheral devices that may no longer support an older version of OS X.
    OS X is not just "OS X" with a bunch of peripheral changes to it. There are a number of under the hood enhancements and changes that have fundamentally altered the OS from one version to the next over the years, be it from the kernel all the way through how accounts are handled, to how background services are run and otherwise managed. Granted from one version to the next is sometimes not as significant of an upgrade, but for the most part there are significant changes. In OS X Mavericks, Apple has added major changes to memory and process management, which offer potential to greatly increase battery life, and/or reduce power consumption and wasted CPU cycles.
    Of course, with any upgrade you will get the potential for drawbacks, such as initial break-in hiccups.

Maybe you are looking for

  • Highly frustrated with Outlook 2013 Search People box bugs - Multiple Name Results for Same Contact & Inconsistent Results

    The Outlook 2013 "Search People" box does not function properly. It frequently displays incorrect results or a mess of duplicate results. I've reported previous issues about this and consolidating my posts into one (with screenshots this time). Hopef

  • OBIEE 11g RPD deployment issue.

    I have installed OBIEE 11.1.1.5.0 32 bit on windows7. I am getting issue while deploying RPD. I clicked on Lock & Edit button and it enabled the "Browse" button. I clicked "Browse" button and selected the new RPD file but it is not taking new rpd fil

  • Problem using ebook text for LR4

    I have been using the ebook text Classroom in a Book for Lightroom 4.  I am working on two screens:  Classroom in a Book is on the secondary screen; LR4 is on the main screen.  I have gone through 4 of the lessons.  At some point during Lesson 4 I mu

  • Planning layout for material and cost element

    Dear all, i need to upload data from r/3 and start planning from data i have uploaded. data is as follows: year month material amount what i need to do is to put data in planning layout and put cost element next to that and manually enter cost elemen

  • Cos_cache_add_dn_tmpls debug message

    When I enable nsslapd-errorlog-level: 65536, messages like the following show up in the error log: [14/Mar/2007:15:27:41 -0700] - DEBUG - conn=-1 op=-1 msgId=-1 - cos_cache_add_dn_tmpls: incomplete cos template detected in cn=posixAccount,ou=cosTempl