How can transfer data from a dialog to another panel?

Will anyone help me?Thanks.
In our project,When the user need to fill some data into the textfield in a panel,he can simplify this action by click a button,when the button is clicked,then a dialog which contains a table of all the imformation of all customers will show,then the user can select one customer's information from the table,after click a button such as "OK",the selected information will show in corresponding textfiled in another panel.Because the dialog and the panel are two
different object,so how can I transfer the data selected from the dialog to the panel and show the updated information timely??

try this program. it exchanges some data between s adialog and a frame.
akz
* @version 1.20 01 Sep 1998
* @author Cay Horstmann
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class DataExchangeTest extends JFrame
implements ActionListener
{  public DataExchangeTest()
{  setTitle("DataExchangeTest");
setSize(300, 300);
JMenuBar mbar = new JMenuBar();
setJMenuBar(mbar);
JMenu fileMenu = new JMenu("File");
mbar.add(fileMenu);
connectItem = new JMenuItem("Connect");
connectItem.addActionListener(this);
fileMenu.add(connectItem);
exitItem = new JMenuItem("Exit");
exitItem.addActionListener(this);
fileMenu.add(exitItem);
public void actionPerformed(ActionEvent evt)
{  Object source = evt.getSource();
if (source == connectItem)
{  ConnectInfo transfer= new ConnectInfo("yourname", "pw");
if (dialog == null)
dialog = new ConnectDialog(this);
if (dialog.showDialog(transfer))
{  String uname = transfer.username;
String pwd = transfer.password;
Container contentPane = getContentPane();
contentPane.add(new JLabel("username=" + uname + ", password=" + pwd),"South");
validate();
else if(source == exitItem)
System.exit(0);
public static void main(String[] args)
{  JFrame f = new DataExchangeTest();
f.show();
private ConnectDialog dialog = null;
private JMenuItem connectItem;
private JMenuItem exitItem;
class ConnectInfo
{  public String username;
public String password;
public ConnectInfo(String u, String p)
{ username = u; password = p; }
class ConnectDialog extends JDialog implements ActionListener
{  public ConnectDialog(JFrame parent)
{  super(parent, "Connect", true);
Container contentPane = getContentPane();
JPanel p1 = new JPanel();
p1.setLayout(new GridLayout(2, 2));
p1.add(new JLabel("User name:"));
p1.add(username = new JTextField(""));
p1.add(new JLabel("Password:"));
p1.add(password = new JPasswordField(""));
contentPane.add("Center", p1);
Panel p2 = new Panel();
okButton = addButton(p2, "Ok");
cancelButton = addButton(p2, "Cancel");
contentPane.add("South", p2);
setSize(240, 120);
     //custom method to create and buttons to a container
JButton addButton(Container c, String name)
{  JButton button = new JButton(name);
button.addActionListener(this);
c.add(button);
return button;
public void actionPerformed(ActionEvent evt)
{  Object source = evt.getSource();
if(source == okButton)
{  ok = true;
setVisible(false);
else if (source == cancelButton)
setVisible(false);
public boolean showDialog(ConnectInfo transfer)
{  username.setText(transfer.username);
password.setText(transfer.password);
ok = false;
show();
if (ok)
{  transfer.username = username.getText();
transfer.password = password.getText();
return ok;
private JTextField username;
private JTextField password;
private boolean ok;
private JButton okButton;
private JButton cancelButton;

Similar Messages

  • How can transfer data from my old computer to my iMac

    How can transfer data from my old computer to my iMac

    Depends. what two computer modelss do you have? Do they both have Firewire ports and/or Thunderbolt ports? Do you have a home network with a router that has Ethernet ports available for each computer? Do you have an external hard drive available that could be used to transfer data?

  • How  to transfer data from one system to another by datamart please give de

    how  to transfer data from one system to another by datamart please give details

    Hi Deba,
    Find the below SAP help doc which may help u...
    http://help.sap.com/saphelp_nw70/helpdata/en/12/43074208ae2a38e10000000a1550b0/frameset.htm
    Also find the below threads...
    Loading data from one cube to another cube.
    data copy from infocube to infocube in two different BW systems
    Delta when loading from ODS to ODS
    reg datamart
    Data mart flag
    Regards,
    KK.

  • How to transfer data from one macbookpro to another

    how to you transfer data from one macbookpro to another. the other one was stolen.

    If your computer was stolen and you don't have a data backup, you can't transfer data from the stolen computer to your new one. If you have a data backup, restore the data to the new computer.

  • How to transfer DATA from one machine to another using  DBlink

    I want to transfer data from one machine to another both having oracle 8.0.5 with AIX operating system using DB link. CAn any one help me in this task

    Step one - Create and test SQLNet connections between the databases.
    Step two - Create at least on database like from one database to the other:
    CREATE DATABASE LINK linkname
    CONNECT TO user identified by password
    USING 'tnsnamesentry';
    Step three - use the dblink linkname in dml statements eg:
    insert into emp@linkname
    (select * from emp);

  • How to transfer data from one phone to another

    my daughter got a new phone.  she is trying to transfer data from her old phone.  she cant remember her icloud password.  we can't have them email because the email uses the same password.  If i delete the account all the information we are trying to transfer will be lost.  Any idea how to retrieve the password?

    You transfer data to a new phone by backing up the old one, then restoring the backup to the new one (see http://support.apple.com/kb/ht2109).
    Also, deleting the account only deletes it from the phone, not from iCloud.  But if you're running iOS 7 with Find My iPhone turned on you'll need the password in order to delte the account.
    If you need to reset the password, contact Apple for assistance by going to https://expresslane.apple.com, then click More Products and Services>Apple ID>Other Apple ID Topics>Lost or forgotten Apple ID password.

  • How to transfer data from one client to another client

    Dear Experts,
    Please explain how to transfer data (Materials) from one client to another client?
    Thanks,
    Ajay Kumar

    Hi Ajay,
    Check any of below methods
    Refer thread http://scn.sap.com/thread/171981 where people use IDOCs for master data transfer.
    OR
    This is done by BASIS team, by client refresh or client copy. Check with your basis team for this and there is some predefined time when they plan this activity, and in most project they do it once in 3 months etc to get production environment in test system which helps to resolve issues of production by creating similar case in test system.
    Check below threads for more information
    http://sap.ittoolbox.com/groups/technical-functional/sap-basis/cleint-copy-vs-client-refresh-1377848
    http://basissap.blogspot.in/2008/05/what-is-client-copy.html
    OR
    You can download data from one client and upload in another through BDC or LSMW.
    Regards,
    Sharat

  • How to transfer data from one MBP to another on the same wireless network?

    Hello All,
    My wife & I both have MBP's & are connect to the internet wirelessly via a Comcast-supplied Arris modem & a Belken router I purchased.
    Please don't laugh too hard but when I share data with my wife I, first, transfer it onto a flash drvie, then I walk to my wife's mbp & transfer the data from the flash drive to her mbp.
    I have a feeling there is a better way.    Since I guess we are on the same network can I do this wirelessly some how?
    Any help would be appreciated!
    Thanks in advance.
    Jim

    here is a link to some information on AirDrop --
    http://support.apple.com/kb/HT4783?viewlocale=en_US&locale=en_US

  • How to transfer data from an IFrame to another page

    Hi,
    I had a search page with a search selection and an interactive report region for the result.
    Then, via a button, I submitted the data from the search results to another page (plsql process).
    Now we have changed that and the interactive report with the results is located in an own page, this page is 'embedded' in my old Search page within an IFrame.
    If I want to use the button to transfer the data --> no data is transferred. I guess this is because the button and the process is not on the new page but in the old search page.
    How should I handle that now? Any suggestions are appreciated!
    Thank you!
    BR
    Lena

    Hi,
    You could try moving the process to the report page and have a hidden button on the page as well. Your existing button could call some javascript that does something like:
    document.frames("iframe_ID").document.doSubmit("report_page_button_name");I don't use IFRAMEs myself any more as some functionality is not available "for security reasons" in javascript, so the above is just a theory!
    Andy

  • How to transfer data from one table to another without duplicates

    This is what I use to quote bathroom remodels. The first thing I do is completely fill in the Master Item List with every Product or Service we can think of to do the project. The Type column has a pop-up menu which includes Combo because some Contractors don't separate the Product from Labor. The Category Totals Table is useful but since some Contractors provide Product and Service at the same time on one invoice I don't get accurate breakdowns for generating my invoices.
    What I would like is to transfer all Vendor names included in the project to the Vendor Totals Table but without any duplicates. Some Contractors might perform services in several categories. I've read many listings in the forum and am just not seeing the answer.
    I have a sample file ready to send. I don't see a way to send it with this message. First Post! Sorry!
    Thank You
    Jeff

    jwoods007 wrote:
    What I would like is to transfer all Vendor names included in the project to the Vendor Totals Table but without any duplicates.
    Hi Jeff,
    Welcome to Apple Discussions and the Numbers '09 forum.
    If your Vendor names (including duplicates) are all in the same column of the source table, it shouldn't be difficult to transfer them to a second table using the technique described below.
    For the example, the source table is named Main and has one header row, the Vendors are listed in column C (starting at C2), and column B is used as an index column. Note that to use VLOOKUP, the index column must be to the left of the Vendor column.
    The index is generated using the following formula in B2, and filled down to the end of the column:
    =IF(COUNTIF(C$1:C2,C)=1,MAX($B$1:B1)+1,"")
    On the second table, Vendor List, the following formula is used in Column A (starting at A2) to collect the indexed vendors from the Main table"
    =IFERROR(VLOOKUP(ROW()-1,Main :: B:C,2,FALSE),"")
    IFERROR is used to trap the "couldn't find" error in the 'empty' rows of Vendor List.
    'FALSE' displays as "exact-match" in the formula, and prevents the rpeated listing of the last vendor that would be created by 'close-match'.
    Regards,
    Barry

  • How can you transfer data from one ipod to another ?

    How can you transfer data from one ipod to another ipod ?

    The geniusbar told me what to do, I understood but there is still a problem for me >:/ It's not showing up though. Like "device."  Nothing is happening, and I tried as soon as I got home. Then after half an hour, then an hour, then 3 hours. My problem is that it's not showing up! It's stuck in recovery mode! There's still like 25% battery. So I have no idea why.

  • How do I transfer data from one iPhone to another?

    How do I transfer data from one iPhone to another?

    If your old device is an Apple using iOS 5 or later, and you have an iCloud account, you can transfer all your saved messages, email accounts, photos, notes, and other personal settings to your new iPhone.
    Here's how...
    Connect your old Apple device to WiFi and to a power source.
    Back it up to iCloud by going to Settings > iCloud > Storage & Backup and toggling iCloud Backup on. The time it takes to ba ckup depends on how much data you have and on the speed of your internet connection.
    iCloud backs up your device once a day. If it needs backing up before you transfer to your new iPhone 5, tap Back Up Now in Settings > iCloud > Storage & Backup. Do not start transferring before the backup is finished.
    Turn on your new iPhone and complete the setup by selecting your language and country, and choose whether to enable Location Services. When prompted, choose your WiFi network.
    When prompted to set up, choose Restore from iCloud Backup, tap Next, and enter your Apple ID and password.
    Select the backup of your old device and tap Restore. Wait until the device has finished restoring from the backup.
    When the restore process is complete, your iPhone will restart and be ready to use.
    Connect your iPhone 5 to iTunes to sync data not contained in the backup (such as music, videos, apps, and so on). You can choose the data that are synced by clicking the syncing tabs in iTunes.

  • How to transfer data from macbook pro to an external hard drive, im using (WD 1TB 3.0) ???. I cannot copy anything from my mac to it not a single file.

    how to transfer data from macbook pro to an external hard drive, im using (WD 1TB 3.0) ???. I cannot copy anything from my mac to it not a single file.

    ok - since you'll be sharing it with a PC - connect it to your windows pc - then format from there - instead of NTFS format - choose exFAT.
    or, you can read the link below on how to do it in dos mode.
    http://answers.microsoft.com/en-us/windows/forum/windows_7-files/how-can-i-forma t-external-drive-in-exfat-not-in/0f6bf19a-19d6-4470-ae05-53ddf26bb476?msgId=1860 eae3-3488-4eea-8326-f87b89d9851b
    once you've formatted it - you can now use it in both your macbook and windows computer.

  • How to transfer data from ECC to CRM via IDocs (Clfmas01),

    Hi all,
    how to transfer data from ECC to CRM via IDocs (Clfmas01), that to material master data from ECC to Production master data in CRM.    
    Need Information regarding, how to upload file to CRM from ECC, through, IDocs......Plz help me...
    Edited by: khaja fareed on Jan 11, 2010 12:44 PM

    First of all push ECC data in to GTS server through T.code:/N/SAPSLL/MENU_LEGALR3. First click on Master data tab there enter customer/vendor number then execute.
    2-Go to document tab there enter Sales order no/PO number then execute it.
    Then go to GTS server in compliance management module you can get all the information.
    Regards
    Sitanshu Panigrahi

  • How to transfer data from FPM_POWL_UIBB to FPM_FORM_UIBB

    Hi Team,
    How to transfer data from one UIBB (component is FPM_POWL_UIBB) to another UIBB ( Componenet is FPM_FORM_UIBB).
    I know the procedure how to transfer data from FPM_LIST_UIBB to FPM_FORM_UIBB using wiring concept, but from FPM_POWL_UIBB am unable to do that.
    Appreciate your quick response.
    Thanks in advance.
    Thanks,
    Satya.

    Hi Bruce,
    Thanks for quick response.
    I will explain my requirement in detail.
    IN FPM I have used  5 UIBB's ,
      1) FPM_POWL_UIBB with Custom component and its configuration
      2) FPM_FORM_UIBB which is a standard componet UIBB's their configurations and its feeder classes are as below,
                 EAMS_WDC_ORD_LONGTEXT_CFG       CL_EAMS_UI_FD_ORD_LTXT
                 EAMS_WDC_ORD_HEADER_CFG          CL_EAMS_UI_FD_ORD_HEADER
                 EAMS_WDC_ORD_RESPONSIB_CFG     CL_EAMS_UI_FD_ORD_HEADER
      In the above FPM application if I choose a record in FPM_POWL_UIBB it has to be appear in the respective standard UIBB's in edit mode so user can change according to his/her comfort and will save.
    I have tried Singleton method also but not able to transfer data as I got confused which interface I shoul use in singleton class , as I was working with FPM_POWL_UIBB I may not use IF_FPM_GUIBB_FORM.
    Please suggest me on this.
    Thanks,
    Satya.                  

Maybe you are looking for

  • My iTunes has about 3000 tracks but not all of it will sync onto my iPod

    i recently purchased an 80GB iPod shuffle which can also play videos and movies. i bought it recently, but i'm haveing a hard time getting used to iTunes and all this apple, mac business. i have windows XP professional, i made sure i put all the musi

  • Wrong aspect ratio (4:3) HDV files (16:9)

    Hi! I'm using iDVD 5.0.1. My source video is HDV 1080i. iDVD preview shows 16:9 aspect, but my burned DVD disks played in Apple DVD Player and regular DVD players are displaying 4:3 aspect ratio... (on 4:3 and 16:9 TV sets) How can I fix this problem

  • Renaming a Tablespace and Schema in Oracle 9i

    hi, i have the following scenario 1') Schema with name X attached with a default tablespace whos name also is X. i want to now move to Schema with name Y attached with a default tablespace whos name is Y. but i want the data to be same as that of poi

  • OpenOffice .odt file downloaded as .txt

    Hello, when I try to download a .odt file from the web (right-click/download link), the file is saved as anyfile.odt.txt ... I have then to change the file type and answer "yes" to the message "do you really want to change the file type". OpenOffice.

  • Failed to load script class for script ...

    We are trying to run a script in Thin Client mode, recorded in Oracle Functional Testing, But get: "Failed to load script class for script ...". Anyone has any tips for what we should check to solve this problem?