I would want to capture the reference of memory of a generic component ?

I would want to capture the reference of memory of a generic component
example1 ->{javax.swing.JScrollPane@678 }
example2 ->{javax.swing.JTextField@577 }
ecc..
Thanks

I would want to capture the reference of memory of a
generic component
example1 ->{javax.swing.JScrollPane@678 }
example2 ->{javax.swing.JTextField@577 }
ecc..
Thanksuse an Objectit is the closest thing in the language to a memory reference
all EventListeners have a getSource() method that yields an Object
Furthermore anything allocated with new descends from Object
For example, lets say you added the same ActionListener to 3 different buttons
You could test which button triggered the action as follows
Let e be the ActionEvent passed to the ActionPerformed method of an ActionListener
if (e.getSource().equals(jButtonOne)){; // jButton1 actions
} else if (e.getSource().equals(jButtonTwo)){;//jButton2 actions
} else if (e.getSource().equals(jButtonThree)){;//jButton3 actions
}The equals method of Object is the Java idiom for comparing memory references.

Similar Messages

  • Lightroom 6 is up and running.  Upgraded from LR5.  However I want to change the file name to be more generic, e.g., description in LR5 references LR5 and I want to change that to just John G's LR Catalog/Library.lrcat.  How can I accomplish this without

    Lightroom 6 is up and running.  Upgraded from LR5.  However I want to change the file name to be more generic, e.g., description in LR5 references LR5 and I want to change that to just John G's LR Catalog/Library.lrcat.  How can I accomplish this without fouling everything up?

    Ok, well you'll need to do something like this. Now this part is a little dependent on your database server:
           try {
                Class.forName("org.gjt.mm.mysql.Driver").newInstance();
                Connection c = DriverManager.getConnection(
                                                           "jdbc:mysql://{database-server}/{database-name}:3306?user={username}&password={password}");
                Statement Stmt = c.createStatement();
                int count = Stmt.executeUpdate(cmd);
                if(count>0) {
                     System.out.println("count: " + count);
            } catch (Exception e) {
                e.printStackTrace();
        }That was some sample code for a MySQL database.
    Note that the applet can only contact the server that is was loaded from, so you might want to do a getCodeBase() or something like that to get the server address.
    Hope this is helpful.

  • How it would want to change the speed of iPhone 4 3G to 4G?

    How it would want to change the speed of iPhone 4 3G to 4G?

    you can't by any means

  • How to only capture the reference machine task sequence SCCM 2012R2.

    Hi.
    I need to capture the reference machine via SCCM 2012 R2 PXE,
    do not
    need to
    perform
    the build process. I have the machine refence.
    Diego Almada

    Thanks, the
    first
    step
    works
    without
    problems.
    I need to
    capture
    the
    image
    of
    a machine
    installed
    through
    PXE.
    Sorry for
    not
    write
    very
    well
    in
    English.
    Diego Almada

  • I want to capture the remainder of a division operation

    Hi,
    I need to capture the remainder  of a division operation. Ex : 33/9  remainder is 6. I want to know the way to capture the remainder. Can any body help me out.
    Regards,
    Srinivas

    Hi,
    MOD : Integer remainder of the division of the left by the right operand
    Syntax
    [COMPUTE] result = [+|-] operand1
                       [{+|-|*|/|DIV|MOD|**} [+|-] operand2
                       [{+|-|*|/|DIV|MOD|**} [+|-] operand3
    In an arithmetic expression, you can use arithmetic operators to link an operand operand1 with one or more operands operand2, operand3, and so on; parentheses are possible. Arithmetic expressions can only be used in the COMPUTE statement. Each arithmetic expression has a calculation type.
    Arunima

  • Want to capture the exception in webservice?..

    Hi,
    I have written a BAPI within the MAIN function module for Asset creation. Suppose if the asset is not created due to some invalid data i dont want to use the BAPIRET2 structure for Exception handling, but i want to capture on the MAIN function module EXCEPTIONS.
    Note: EvenIf the BAPI fails the sy-subrc is 0.
    Please suggest.
    Regards,
    Neslin.

    Hi Neslin,
    the following content may help you
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/107aeaf2-540f-2a10-4286-a03955f5274c
    if helpful reward points are appreciated

  • Want To Capture The File name Using the SQL Loader

    Hi,
    I Am loading The Data To Staging Table Using The SQL*developer, The File That need to be Loaded Will be One Of The Input To the SQL*Loader Concurrent Program.
    In One Of The Column Of My staging Table I want To Put The File name.
    Can We do the Same.
    thanks,
    Ankit

    Not unless you generate the loader controlfile dynamically.. try this.. pass file name as $1 first parameter. Use the below example and modify as per your requirement
    1) create table with following table structure
    create table temp_table (x varchar2(20),file_name varchar2(30));
    2) create data file - test.dat (contains only values for x)
    abc
    def
    geh
    ggg
    fff
    3) create a host file host file - test.sh with following content:
    echo "load data
    infile $1
    append
    into table temp_table
    fields terminated by ','
    (x,
    file_name constant "$1")" > test.ctl
    sqlldr <usr>/<pwd>control=test.ctl
    4) run the host file from unix prompt with data file name as parameter (ensure test.sh has execute permissions)
    test.sh test.dat
    Hope this helps
    Regards,
    Bhadri

  • To capture the Mini-DV file through the 1394 firewire card from t

    hii there!
    first let mi make you understand what we people are doing ....
    We people want to capture the Mini-DV file directly through the 1394 firewire card from the sony camcorder in to the MPEG2
    format. Thent on the fly(i.e.during capturing into MPEG2) we also want to capture the metadata i.e (time,date etc. of the
    original shooting event) into some text file. Our MPEG2 format requirements are: 8mbps viedeo,freq-48KHz,16 bit sterio,384
    audio kbps, Deinterlace... we are using JavaMediaFramework-2.1.1e(Java Media Studio tool)..so we want to explore that tool
    much more coz rightnow it's not supporting MPEG2(only supporting MPEG1) and also not supporting 1394 cpture card ...we want
    the codec for converting DV-AVI to MPEG2 with date and time exctrated and much more explored details about JMf2.1.1 JavaMedia
    Studio to get more familiar.....
    for the above mentioned problem I am trying to add the mpeg2 codec inthe plugin of the jmf studio..and i have followed the
    steps ..
    Download the Codec from IBM
    Extracted jmf.jar
    Extracted codec.zip
    Added files from codec folder to jmf folder
    Made a jar out of it and name it jmf.jar
    Replaced that with current jmf.jar (kept a backup)
    Opened JMFRegistry and in "Plugins","Codec" and now unable to add " "
    this becoz i am not knowing the exact way of recopiling that newly created jar file and because of that that mpeg-2 codedc is
    not get added .....so i am looking forward for any help for the above mentioned problem!
    I would be gratefull on getting ur help coz it's such challenging and techy concept to explore...
    thanks..
    nilesh hardikar
    contact: [email protected]

    I understand your pain. See BUG ID 4640032: JMF does not support DSVD encoding
    http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4640032
    Add your vote, maye Sun will hear!

  • How to capture the user activities in Project Server 2010

    Hi
    I want  to capture the user activities from Project Server 2010 like when a user has saved and published etc.
    Is there any possibility that we can get the user activities data from sql server.
    Please throw some light on the same.
    Thanks
    Geeth If you feel that the answer which i gave you is Helpful please select it as Answer/helpful.

    Hi Geetha,
    As far as I know, there is no such information stored in Project Server DB.
    You can have this kind of information by project, such as the ProjectModifiedDate in the Reporting DB (MSP_EPMProject_userView). I also know that there is a PROJ_LAST_SAVED date in the Draft DB. But be aware that querying in the Draft DB is not supported
    by MS.
    Another way would be doing some custom code, storing in a separate DB each save and publish operation per user.
    Hope this helps.
    Guillaume Rouyre - MBA, MCP, MCTS

  • Using dbms_metadata.get_ddl to capture the alter table

    Hi there,
    I know you can capture table ddl using dbms_metadata.get_ddl. However, I want to capture all the changes after the table got created. If you created a table then add one or more columns. I just want to capture the change as the new columns added.
    Here's an example.
    Create table test (id number, name varchar2(20);
    then
    alter table test add (type varchar2(40);
    I want to capture the syntax "alter table test add (type varchar(40)". Is this possible?
    Thanks

    I dont belive you could easily use dbma_metadata to do this... but you can use a database or schema level trigger e.g. :
    create or replace trigger test.test_trigger
    AFTER ALTER
    ON DATABASE
    DECLARE
    sql_text ora_name_list_t;
    v_stmt VARCHAR2(2000);
    n number;
    BEGIN
    n := ora_sql_txt(sql_text);
    FOR i IN 1..n
    LOOP
    v_stmt := v_stmt || sql_text(i);
    END LOOP;
    INSERT INTO test.test_table2
    VALUES
    (v_stmt);
    END;
    This will capture all alter commands fired at the database... so you would then need to filter them using the System-Defined Event Attributes see
    http://download-uk.oracle.com/docs/cd/B19306_01/appdev.102/b14251/adfns_triggers.htm#i1006211

  • How to capture the parameter value of Concurrent Program submited

    Hi,
    I would like to capture the Parameter value of Concurrent Program submitted through Submit Request screen based on that i want to return value.
    When Conc prog "Payroll Run" along with parameter like "Pay Period" which has LOV attached to it, which has one coulumn named "End Date", this value selected needs to be captured. Can you please tell the Table name where the value is stored or Captured.
    I want this value to be used in Fast Formula which will return the desired value to Input Value.
    Actually in one of the Element I have Input Value as "Monthly Days" which should be populated with the "Number of days" in the period in which Payroll is being processed.
    Thanks in advance.
    Ram

    Hi,
    fnd_concurrent_requests.argument_text stores the argument values in comma separated form. But check the prior response from thierry first - fnd_concurrent _requests is not the place you want to be getting things from as it can be purged and so you source data is gone!
    Gareth
    http://garethroberts.blogspot.com

  • How to capture the product change on the item level in CRM GUI.

    Dear All:
    There is a line item in the sales order. Now I change the product of the line item. I want to capture the change in CRM GUI.
    PS:
    There is a reference thread, in which I know we can capture the change in WebUI with the component T115IT_SLSO.
    Can the old product be captured after I changed the product in order item?
    But I want to know how to capture the change in GUI. Anybody can help me? Thanks in advance.

    Hi,
    when you create an item in GUI tcode CRMD_ORDER, badi CRM_ORDERADM_I_BADI will be triggered.
    Method CRM_ORDERADM_I_PRODUCT_DETERM will have the Header and item guid and newly entered product in parameter IV_ORDERED_PRODUCT.
    Regards,
    Arun

  • How to capture the error messages from incorrect session?

    Hi SDNs.,
    i am using BDC Session method to update transaction FB01. So my job runs daily. here i want to capture the error messages and i want to send it to mail.  Can i capture the unprocessed records???
    i think FM <b>SO_NEW_DOCUMENT_ATT_SEND_API1</b> used for sending mail? but how to capture mes or records?
    or Is there any other way to Do it???
    Thankning you.,
    Ram

    Hi Ramakrishna,
       Once you create the session, Process the session using
    the report RSBDCSUB using submit statement.
    It would list out the erroneous records.
    Hence, while submitting, just say submit RSBDCSUB in background and export output list to memory.,
    Then you can retrieve the list from memory using the FM LIST_FROM_MEMORY into the internal table and finally send the email by the fm you have already mentioned.
    Regards,
    Ravi

  • Capture the First Changed Date In actions Infotype In PA30

    Hi experts,
    I want to find out the date on which the actions record was created. Where can i find this ?.
    For ex if i am creating a record on 01.07.2011 with start date 25.06.2011 the change date would be 01.07.2011 in pa0000.
    If i change it on 10.07.2011, the change date would be 10.07.2011. I want to capture the date when i actually created it(01.07.2011). I tried the T.code S_AHR_61016380 . But it contains the log of the changes done from the second time.
    Can anyone plese help me?
    With thanks in advance,
    Syed Ibrahim .G

    hi prabhu,
    thanks for the reply. I tried the function modules and these function modules also return the logs of the data changed .
    But i need to get the log of the record when it was created first.
    For ex : for actions info type i created a record with start date as 20.09.2011 .When i tried the function module it did not return any values. Then, i changed the record i created for actions info type . now i executed the Fm , now i was getting the log for the data changed and not for created.Can some one throw light on this.
    With thanks in advance,
    Syed Ibrahim .G
    Edited by: SYED_ibbu on Sep 22, 2011 9:51 AM

  • Capturing the text of a textfield to be used in another class

    Hi Java Gurus. I have two classes called Login and Profile. In the Login class, a user will enter a username and password which is verified against a table stored in an oracle database. This works fine.
    My problem is that when the user enters his/her username, I want to capture the username of the user so that I can make a reference to it from the Profile class.
    You may wonder why I am doing this from the Profile class. Well, I want the user's profile to be uploaded after login and in order for me to do this, I am using the username in my SELECT statement from my Profile class to upload the profile of a specific user.
    Thanks a lot in advance!

    Hi guys! Maybe none of you who have already viewed my problem understood what i meant, so i'll try to explain using some code snippets.
    Login class;
    public class Login extends JDialog implements ActionListener{
    JLabel nameLabel;
    JLabel passLabel;
    JTextField name;
    JTextField pass;
    JButton okButton;
    JButton cancelButton;
    JPanel buttonPanel;
    public Login(){
    nameLabel = new JLabel("Username:");
    passLabel = new JLabel("Password:");
    name = new JTextField(10);
    pass = new JTextField(10);
    okButton = new JButton("Ok");
    cancelButton = new JButton("Cancel");
    buttonPanel = new JPanel();
    buttonPanel.setLayout(new FlowLayout());
    buttonPanel.add(okButton);
    buttonPanel.add(cancelButton);
    setSize(new Dimension(100,200));
    setLayout(new GridLayout(1,5));
    add(nameLabel);
    //Add remaining components here and display dialog
    public void connect(){
    //connect to database here
    public void ActonPerformed(ActionEvent evt){
    //do events here
    }Profile class;
    public class Profile extends JPanel{
    JLabel fnameLabel,lnameLabel,dobLabel;
    JTextField fnameText,lnameText,dobText;
    Login login;
    public Profile(){
    //initialize variables here
    public void connect(){
    //connect to database here
    public void getProfile() {
    String uname = login.name.getText();
              String fname = "";
              String lname = "";
              String dob = "";
              Statement stmt = null;
              connect();
              try {
              stmt = conn.createStatement();
              ResultSet result = stmt.executeQuery("SELECT Firstname,Lastname,DOB FROM Profile WHERE User_id ='"+uname+'" ");
                   if (result.next()) {
                        fname = result.getString("Firstname");
                        lname = result.getString("Lastname");
                        dob = result.getString("DOB");
                                            if ((fname.length() != 0) && (lname.length() != 0)) {
                             fnameText.setText(fname);          lnameText.setText(lname);               dobText.setText(dob);                    validate();
         repaint();
              } catch (Exception ex) {
                   System.out.println(ex);
                   //JOptionPane.showMessageDialog(null, "Please enter your username\n
                   // and password", "Logon error", JOptionPane.INFORMATION_MESSAGE);
    }So please i need your help.....

Maybe you are looking for