Testing for JButton in actionPerformed?

Hello,
My code includes an array of JButtons, and for each button I set the action command using setActionCommand.
I just wondered in the actionPerformed method how I could test if one of the JButtons had been selected, and which actionCommand?
Thank you

Looking back at my calculator code, I just realized that the code in the actionPerformed can be simplified to just:
display.replaceSelection( e.getActionCommand() );This assumes that you have a unique ActionListener for all buttons related to entering a number in the calculator (in your case, selecting a specific)
So, if the only information you need is the track name and you have provided a separate ActionListener for the 'track selection" buttons then you have no need to actually get the source button that was clicked. All you need is the "action command".
My question is how does that information allow you to switch to play that particular track? Would it not be better to simply store "0, 1, 2, 3, 4..." to represent each track and then that value would be used to switch playing to the new track and to provide the title for the track.

Similar Messages

  • Background for JButton

    Hi all I am doing design a background for JButton and also doing design a metal look and place this as
    backgroung rather than using the plain colours eg black, red.
    I dont want to use setIcon because I would like to place an Icon on top eg an arrow for previous or next..
    Here is my sample code:
    import java.awt.*;
    import javax.swing.*;
    public class JImageButton extends JButton
    Image backgroundImage;
    public JImageButton()
    super();
    public JImageButton( Action a )
    super( a );
    public JImageButton( Icon icon )
    super( icon );
    public JImageButton( String text )
    super( text );
    public JImageButton( String text, Icon icon )
    super( text, icon );
    public void setBackgroundImage( Image image )
    MediaTracker mt = new MediaTracker( this );
    mt.addImage( image, 0 );
    try
    mt.waitForAll();
    backgroundImage = image;
    catch( InterruptedException x )
    System.err.println(
    "Specified background image could not be loaded." );
    public void paintComponent( Graphics g )
    super.paintComponent( g );
    Color saved = g.getColor();
    g.setColor( getBackground() );
    g.fillRect( 0, 0, getWidth(), getHeight() );
    g.setColor( saved );
    if( backgroundImage != null )
    int imageX = ( getWidth() - backgroundImage.getWidth( this ) ) / 2;
    int imageY = ( getHeight() - backgroundImage.getHeight( this ) ) / 2;
    g.drawImage( backgroundImage, imageX, imageY, this );
    if( !getText().equals( "" ) )
    g.drawString( super.getText(), getWidth() / 2, getHeight() / 2 );
    if( getIcon() != null )
    Icon icon = getIcon();
    icon.paintIcon( this, g, 10, 10 );
    public Dimension getpreferredSize()
    Dimension oldSize = super.getPreferredSize();
    Dimension newSize = new Dimension();
    Dimension returnSize = new Dimension();
    if( backgroundImage != null )
    newSize.width = backgroundImage.getWidth( this ) + 1;
    newSize.height = backgroundImage.getHeight( this ) + 1;
    if( oldSize.height > newSize.height )
    returnSize.height = oldSize.height;
    else
    returnSize.height = newSize.height;
    if( oldSize.width > newSize.width )
    returnSize.width = oldSize.width;
    else
    returnSize.width = newSize.width;
    return( returnSize );
    And here's a tester to show how it works...
    code:
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class JImageButtonTest extends JFrame
    JButton jb1, jb2;
    JImageButton jib1, jib2, jib3;
    Image backgroundImage;
    ImageIcon icon;
    public JImageButtonTest()
    super( "Test for JImageButton" );
    Toolkit tk = Toolkit.getDefaulttoolkit();
    // Replace "someImage" and "anotherImage" with your own
    // images...
    backgroundImage = tk.getImage( "someImage.gif" );
    Image iconImage = tk.getImage( "anotherImage.gif" );
    icon = new ImageIcon( iconImage );
    jib1 = new JImageButton( "Button 1" );
    jib2 = new JImageButton( "Button 2" );
    jib3 = new JImageButton( "Button 3", icon );
    jib2.setBackgroundImage( backgroundImage );
    jib3.setBackgroundImage( backgroundImage );
    jb1 = new JButton( "JButton 1" );
    jb2 = new JButton( "JButton 2", icon );
    JPanel p1 = new JPanel();
    p1.add( jib1 );
    p1.add( jib2 );
    p1.add( jib3 );
    JPanel p2 = new JPanel();
    p2.add( jb1 );
    p2.add( jb2 );
    getContentPane().add( p1, BorderLayout.SOUTH );
    getContentPane().add( p2, BorderLayout.NORTH );
    public static void main( String[] args )
    JImageButtonTest jibt = new JImageButtonTest();
    jibt.addWindowListener( new ExitHandler() );
    jibt.pack();
    jibt.setVisible( true );
    class ExitHandler extends WindowAdapter
    public void windowClosing( WindowEvent e )
    System.exit( 0 );

    Hi noamt3,
    Please look this my test case's below it's working fine here.
    import java.awt.*;
    import javax.swing.*;
    public class JImageButton extends JButton
    Image backgroundImage;
    public JImageButton()
    super();
    public JImageButton( Action a )
    super( a );
    public JImageButton( Icon icon )
    super( icon );
    public JImageButton( String text )
    super( text );
    public JImageButton( String text, Icon icon )
    super( text, icon );
    public void setBackgroundImage( Image image )
    MediaTracker mt = new MediaTracker( this );
    mt.addImage( image, 0 );
    try
    mt.waitForAll();
    backgroundImage = image;
    catch( InterruptedException x )
    System.err.println(
    "Specified background image could not be loaded." );
    public void paintComponent( Graphics g )
    super.paintComponent( g );
    Color saved = g.getColor();
    g.setColor( getBackground() );
    g.fillRect( 0, 0, getWidth(), getHeight() );
    g.setColor( saved );
    if( backgroundImage != null )
    int imageX = ( getWidth() - backgroundImage.getWidth( this ) ) / 2;
    int imageY = ( getHeight() - backgroundImage.getHeight( this ) ) / 2;
    g.drawImage( backgroundImage, imageX, imageY, this );
    if( !getText().equals( "" ) )
    g.drawString( super.getText(), getWidth() / 2, getHeight() / 2 );
    if( getIcon() != null )
    Icon icon = getIcon();
    icon.paintIcon( this, g, 10, 10 );
    public Dimension getPreferredSize()
    Dimension oldSize = super.getPreferredSize();
    Dimension newSize = new Dimension();
    Dimension returnSize = new Dimension();
    if( backgroundImage != null )
    newSize.width = backgroundImage.getWidth( this ) + 1;
    newSize.height = backgroundImage.getHeight( this ) + 1;
    if( oldSize.height > newSize.height )
    returnSize.height = oldSize.height;
    else
    returnSize.height = newSize.height;
    if( oldSize.width > newSize.width )
    returnSize.width = oldSize.width;
    else
    returnSize.width = newSize.width;
    return( returnSize );
    Here tester testcase:
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class JImageButtonTest extends JFrame
    JButton jb1, jb2;
    JImageButton jib1, jib2, jib3;
    Image backgroundImage;
    ImageIcon icon;
    public JImageButtonTest()
    super( "Test for JImageButton" );
    Toolkit tk = Toolkit.getDefaultToolkit();
    // Replace "someImage" and "anotherImage" with your own
    // images...
    backgroundImage = tk.getImage( "someImage.gif" );
    Image iconImage = tk.getImage( "anotherImage.gif" );
    icon = new ImageIcon( iconImage );
    jib1 = new JImageButton( "Button 1" );
    jib2 = new JImageButton( "Button 2" );
    jib3 = new JImageButton( "Button 3", icon );
    jib2.setBackgroundImage( backgroundImage );
    jib3.setBackgroundImage( backgroundImage );
    jb1 = new JButton( "JButton 1" );
    jb2 = new JButton( "JButton 2", icon );
    JPanel p1 = new JPanel();
    p1.add( jib1 );
    p1.add( jib2 );
    p1.add( jib3 );
    JPanel p2 = new JPanel();
    p2.add( jb1 );
    p2.add( jb2 );
    getContentPane().add( p1, BorderLayout.SOUTH );
    getContentPane().add( p2, BorderLayout.NORTH );
    public static void main( String[] args )
    JImageButtonTest jibt = new JImageButtonTest();
    jibt.addWindowListener( new ExitHandler() );
    jibt.pack();
    jibt.setVisible( true );
    class ExitHandler extends WindowAdapter
    public void windowClosing( WindowEvent e )
    System.exit( 0 );
    I hope this will help you out.
    Regards,
    Tirumalarao
    Developer Technical Support,
    Sun Microsystems,
    http://www.sun.com/developers/support.

  • XI testing for two SAP R/3 systems with same system id/logical system

    Hi
    We are currently in the process of upgrading our R/3 4.7 to ECC 6.0 and plan to maintain dual landscape for DEV & QA (4.7 & ECC 6.0) for a period  for testing and maintaining existing applications for fixes etc. The second DEV & QA (upgraded to ECC 6.0) are copy of respective systems and these systems are created automatically under technical systems in SLD by auto update (RZ70).
    The question is, can we use the same XI system for testing inbound/outbound interfaces for both the systems i.e 4.7 & ECC 6.0 at the same time.  I am aware of the fact that XI Technical/Business sytems dependent on unique logical systems, so we cannot create new business system for the upgraded DEV-II ECC 6.0 system. 
    For your information, we have two slds (one for XID/XIQ and second one for XIP).
    What are the options without disturbing & maintaining the current XI system set up?
    1) Can we change current Business systems e.g DEV010 to use new technical system i.e DEV-II ECC 6.0 for testing for a period and switch it back to DEV-I 4.7 technical system?
    2) or change logitical system name of DEV-II ECC 6.0 and create new business sytem in SLD without interfering the existing setup and modify/create interfaces to use this new business system?
    3) Do we need to refresh cache from time to time in XI ?
    4) Any other implications
    We will be upgrading XI to PI 7.1 after ECC 6. 0 Upgrade.
    Any views on this would be highly appreciated.
    Regards
    Chandu

    Hi
    Technical System was created in the SLD automatically after RZ70 configuration in the new DEV-II system. We then modified Business System to use the new Technical system and carried out following steps:
    1)     Original Idoc metadata was deleted from XID
    2)     The port definition  was deleted
    3)     A new port definition was created for new system
    4)     The metadata for each idoc type used was re-created in IDX2 , using METADATA -> CREATE
    5)     This brought in all known versions of the idoc segments, including the 7.1 version.
    I have already checked the guides suggested for our upgrade and we are thinking of going ahead with fresh installation and migrating the interfaces.
    Regards
    Chandu

  • How to test for différent Select into a single PL/SQL block ?

    Hi,
    I am relatively new to PL/SQL and I am trying to do multiple selects int a single PL/SQL block. I am confronted to the fact that if a single select returns no data, I have to go to the WHEN DATA_NOT_FOUND exception.
    Or, I would like to test for different selects.
    In an authentification script, I am searching in a table for a USER ID (USERID) and an application ID, to check if a user is registered under this USERID for this APPLICATION.
    There are different possibilities : 4 possibilities :
    - USERID Existing or not Existing and
    - Aplication ID found or not found for this particular USERID.
    I would like to test for thes 4 possibilities to get the status of this partiular user regardin this application.
    The problem is that if one select returns no row, I go to the exception data not found.
    In the example below you see that if no row returned, go to the exception
    DECLARE
    P_USERID VARCHAR2(400) DEFAULT NULL;
    P_APPLICATION_ID NUMBER DEFAULT NULL;
    P_REGISTERED VARCHAR2(400) DEFAULT NULL;
    BEGIN
    SELECT DISTINCT(USERID) INTO P_USERID FROM ACL_EMPLOYEES
    WHERE  USERID = :P39_USERID AND APPLICATION_ID = :APP_ID ;
    :P39_TYPE_UTILISATEUR := 'USER_REGISTERED';
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    :P39_TYPE_UTILISATEUR := 'USER_NOT_FOUND';
    END;I would like to do first this statement :
    SELECT DISTINCT(USERID) INTO P_USERID FROM ACL_EMPLOYEES
    WHERE  USERID = :P39_USERID Then to do this one if the user is found :
    SELECT DISTINCT(USERID) INTO P_USERID FROM ACL_EMPLOYEES
    WHERE  USERID = :P39_USERID AND APPLICATION_ID = :APP_ID ;etc...
    I basically don't want to go to the not found exception before having tested the 4 possibilities.
    Do you have a suggestion ?
    Thank you for your kind help !
    Christian

    Surely there are only 3 conditions to check?
    1. The user exists and has that app
    2. The user exists and doesn't have that app
    3. The user doesn't exist
    You could do this in one sql statement like:
    with mimic_data_table as (select 1 userid, 1 appid from dual union all
                              select 1 userid, 2 appid from dual union all
                              select 2 userid, 1 appid from dual),
    -- end of mimicking your table
             params_table as (select :p_userid userid, :p_appid appid from dual)
    select pt.userid,
           pt.appid,
           decode(min(case when dt.userid = pt.userid and dt.appid = pt.appid then 1
                           when dt.userid = pt.userid then 2
                           else 3
                      end), 1, 'User and app exist',
                            2, 'User exists but not for this app',
                            3, 'User doesn''t exist') user_app_check
    from   mimic_data_table dt,
           params_table pt
    where  pt.userid = dt.userid (+)
    group by pt.userid, pt.appid;
    :p_userid = 1
    :p_appid = 2
        USERID      APPID USER_APP_CHECK                 
             1          2 User and app exist   
    :p_userid = 1
    :p_appid = 3
        USERID      APPID USER_APP_CHECK                 
             1          3 User exists but not for this app
    :p_userid = 3
    :p_appid = 2
        USERID      APPID USER_APP_CHECK                 
             3          2 User doesn't exist  

  • How to test for existence of AcroXFA test objects?

    Hi -
    I'm writing scripts to test an XFA form with dynamic subforms.  For example, at the end of Part 4, the user hits a Validate button, and if their data is correct, then the Validate button disappears and a Part 5 subform appears.
    So my script looks something like this:
    Function GetButtonPart4Validate()
       Set GetButtonPart4Validate = PDFDoc("TestForm").AcroXFAForm("form").AcroXFAForm("form1")
    .AcroXFAForm("sfPart4").AcroXFAButton("sfValidate")
    End Function
    Function GetPart5()
       Set GetPart5 = PDFDoc("TestForm").AcroXFAForm("form").AcroXFAForm("form1").AcroXFAForm("sfPart5")
    End Function
    GetButtonPart4Validate().Click
    PDFDoc( "TestForm" ).WaitProperty "ready", true, 60000  ' Wait for event processing complete
    If DataTable("boolValidates", dtLocalSheet) = "TRUE"  Then
         If( GetPart5().Exist ) Then
              ' A: Checkpoint Succeeds: Validation was successful
         Else
              ' B: Checkpoint fails: Validation failed
         Endif
    Else
         If(  GetPart5().Exist ) Then
              ' C: Checkpoint Fails:  Validation was unexpected
         Else
               ' D: Checkpoint Succeeds:  Validation failed as expected
         Endif
    Endif
    Unfortunately it appears that XfaSubForm.Exist always returns TRUE.  In other QTP testing domains (eg "Exist Property (WinObject)" in QTP Help), the documented behaviour of the Exist property is to be true if the desired test object can be found in the application-under-test. Typically this means that when the script tries to access an XFA widget which doesn't exist (even something like GetPart5().getROProperty("visible") ), the script stops and thinks for a minute or so, and eventually produces a test error that the object doesn't exist then muddles onward. It is the "stops and thinks for a minute or so" which frustrates me, since these are delays which I am trying to avoid.
    Another possible angle I looked into was counting the subforms under Part 5's parent.
    PDFDoc("TestForm").AcroXFAForm("form").AcroXFAForm("form1").RefreshObject
    PDFDoc("TestForm").AcroXFAForm("form").AcroXFAForm("form1").AcroXFAForm("sfPart5").Refresh Object
    ' check to see if there is a 'sfPart5'
    Dim MyChildren, i
    Set MyChildren = PDFDoc("TestForm").AcroXFAForm("form").AcroXFAForm("form1").ChildObjects
    For i=0 to MyChildren.Count - 1
        print i & " name=" & MyChildren(i).GetROProperty("name")
    Next
    This also seems to fail:  Part5 doesn't appear among its parent's children (at least before QTP actually tries to use it).
    The PDF Test Toolkit User Guide doesn't specifically mention that Exist or RefreshObject or ChildObjects are implemented, so I can't say AcroQTP isn't working as designed, but if you're looking for suggestions for improvement, I'll vote for fulfilling these parts to the QTP.  Please confirm my conclusions that these are not properly implemented, or whether I'm missing something.
    In the meantime, do you have any recommendation on how to proceed?  My present workaround is to look for a "validation error" windows dialog that indicates Part 5 won't exist, but this won't work in future test scripts.
    Cheers,
    Brent

    Hi,
    816387 wrote:
    ... QUERY:-  Find all customers who have at most one account at the Perryridge branch.
    SOLUTION *1* :-
    select customer_name
    from depositor,account
    where account.account_number=depositor.account_number and
    branch_name='Perryridge'
    group by customer_name
    having count(account.account_number) <=1
    ok running correctly
    That finds customers who have exactly one account at Perryridge.
    The assignment is to find customers who have at most one account at Perryridge. You need to include customers with 0 accounts at Perryridge, as well. You could use an outer join, or MINUS, or a NOT IN subquery, or a NOT EXISTS sub-query (as mentioned above) to do that.
    Can there be customers who have no accounts at all, at any branch? If so, you'll need to use the customer table in this problem, as well as depositor and account.
    >
    SOLUTION *2* :-
    select D1.customer_name
    from depositor D1
    where unique
    (select customer_name
         from depositor D2,account A1
         where D1.customer_name=D2.customer_name
              D2.account_number=A1.account_number and
              branch_name='Perryridge'
    gives error:-
    where unique
    ..........*^*
    ERROR at line 3:
    ORA-00936: missing expression
    Logic of both solution are correct . But Solution 2 gives error in oracle. I want unique construct to work.Sorry, it doesn't in Oracle. I don't know of anything like that in Oracle.
    Does "WHERE UNIQUE (SELECT ...)" work in some other database system? Which?
    How to do it. Or How can i test for the absence of duplicate tuples ??????
    Your Solution 1 is the best way to find customers with exatly 1 account (rather than 0 or 1 accounts) at Perryridge. Is there any reason why you wouldn't want to use it, if you ever needed to find customers with exactly one account there?

  • Testing for IS NOT NULL with left join tables

    Dear Experts,
    The query is showing the NULL rows in the query below....
    Any ideas, advice please? tx, sandra
    This is the sql inspector:
    SELECT O100321.FULL_NAME_LFMI, O100321.ID, O100404.ID, O100321.ID_SOURCE
    , O100404.NAME, O100321.PERSON_UID, O100404.PERSON_UID, O100404.VISA_TYPE
    FROM ODSMGR.PERSON O100321
    , ODSMGR.VISA O100404
    WHERE ( ( O100321.PERSON_UID = O100404.PERSON_UID(+) ) ) AND ( O100404.VISA_TYPE(+) IS NOT NULL )

    Hi Everyone,
    I am understanding alot of what Michael and Rod wrote.... I am just puzzled over the following:
    the query below is left joining the STUDENT table to
    HOLD table.
    The HOLD table - contains rows for students who have holds on their record.
    a student can have more than one hold (health, HIPAA, basic life saving course)
    BUT, for this query: I'm only interested that a hold exists, so I'm choosing MAX on hold desc.
    Selecting a MAX, helps me, bec. it reduces my join to a 1 to 1 relationship, instead of
    1 to many relationship.
    Before I posted this thread at all, the LEFT JOIN below testing for IS NOT NULL worked w/o
    me having to code IS NOT NULL twice....
    Is that because, what's happening "behind the scenes" is that a temporary table containing all max rows is being
    created, for which Discoverer has no predefined join instructions, so it's letting me do a LEFT JOIN and have
    the IS NOT NULL condition.
    I would so appreciate clarification. I have a meeting on Tues, for which I have to explain LEFT JOINS to the user
    and how they should create a query. I need to come up with rules.
    If I feel "clear", I asked my boss to buy Camtasia videocast software to create a training clip for user to follow.
    Also, if any Banner user would like me to email the DIS query to run on their machine, I would be glad to do so.
    thx sooo much, Sandra
    SELECT O100384.ACADEMIC_PERIOD, O100255.ID, O100384.ID, O100255.NAME, O100384.NAME, O100255.PERSON_UID, O100384.PERSON_UID, MAX(O100255.HOLD_DESC)
    FROM ODSMGR.HOLD O100255, ODSMGR.STUDENT O100384
    WHERE ( ( O100384.PERSON_UID = O100255.PERSON_UID(+) ) ) AND ( O100384.ACADEMIC_PERIOD = '200820' )
    GROUP BY O100384.ACADEMIC_PERIOD, O100255.ID, O100384.ID, O100255.NAME, O100384.NAME, O100255.PERSON_UID, O100384.PERSON_UID
    HAVING ( ( MAX(O100255.HOLD_DESC(+)) ) IS NOT NULL )
    ORDER BY O100384.NAME ASC

  • Problem in Setting Background Color for JButton

    Hi,
    I am using Background color for JButton (color is selected from the customized JColorChooser created by us) where it contains the option of transparency. If we choose light color, then the background is set to JButton, but when we mouse-over the JButton, other components inside the container (JPanel) is getting displayed inside the button.
    Can anyone help to sort out this problem.
    Thanks in advance.

    Hi,
    Here is the code.
    DialogWrapper is JDialog and ColorEditorPane is JPanel.
    DialogWrapper     dlg         = new DialogWrapper();
    ColorEditorPane colorPanel = new ColorEditorPane();
    colorPanel.setValue( _data.getTransparentColor());
    dlg.showWrappedDialog( colorPanel, "color_help", "color_dialog" );
    if( dlg.isOK())
    Color chosenColor = (Color) colorPanel.getValue().getContent();
    _data.setTransparentColor( chosenColor );
    _transparentColorDisplay.setBackground( chosenColor );
    _transparentColorDisplay.setOpaque( true );
    this.repaint();
    this.doLayout();
    this.validate();
    }I've several components like JCheckBox, JRadioButton, JTextField in "this".

  • How do I test for the presence of an active open document in Photoshop?

    I’m new to Adobe scripting, and one of my first scripts deals with the activeDocument in Photoshop.
    If there is no activeDocument, I want to display a message and terminate the script.  My efforts
    so far have been met with frustration.  While developing the script in ExtendScript Toolkit,
    I used the  test expression "activeDocument in app", and everything worked as expected. And when I installed the script
    in the Photoshop scripts folder and ran it from Photoshop with a document open, it also worked.
    But when I ran the script from Photoshop with no document open, it failed.
    Moreover, after that,the script failed when I tried to run it in ESTK.
    I did some testing and found that my test expression, "activeDocument in app"
    was returning true, even though no document was open.
    Still in ESTK, I replaced the “app” with ”Application” in the test expression.  That worked when
    I stepped through the script.  But when I tried to run it without stopping, it stopped at the
    test expression, and displayed the error message, “Application is undefined.”
    So how do I test for the presence of an open document in Photoshop ??

    After posting this, I discovered the Photoshop Scripting Forum, and I found my answer there.—
    I should have used “app.Documents.length” as my test expression.

  • Best practice standard User Acess Test for WIN2012 AD

    What is the Best practice standard User Acess Test  for WIN2012 AD

    Hello,
    as before, add a computer to the domain and log on with a domain user account to the computer.
    You should be able from the client machine to open the sharedfolders on the DCseither with:
    \\DCName\sysvol
    \\DCName\netlogonor \\NetBiosDomainName\sysvol
    \\NetBiosDomainName\netlogon
    Best regards
    Meinolf Weber
    MVP, MCP, MCTS
    Microsoft MVP - Directory Services
    My Blog: http://blogs.msmvps.com/MWeber
    Disclaimer: This posting is provided AS IS with no warranties or guarantees and confers no rights.
    Twitter:  

  • I was an apple beta tester for iOS7 and now my iPhone 5 shut down, it's unresponsive it gets recognized by iTunes when plugged into the computer but that's it. Since I was a beta tester is there any way to fix my iPhone??

    I was an apple beta tester for iOS7 and now my iPhone 5 shut down, it's unresponsive it gets recognized by iTunes when plugged into the computer but that's it. Since I was a beta tester is there any way to fix my iPhone??

    Are you still running iOS 7 bet?. If so go to the private developer section for help. We cannot help you here with beta software.

  • Linkage Error in Mapping and Operation mapping testing for Synchronous in NWDS

    Dear Experts,
    Hope you all are doing fine..
    I am working in a synchronous scenario Proxy via SAP PI 7.4 to JAVA Application supporting JSON.I wrote JAVA program to convert JSON to XML and while performing test for the JAVA mapping in response structure at Operation Mapping,I am receiving following error..
    LinkageError at JavaMapping.load(): Could not load class: json2xml/bin/pack/EsrJson2Xml
    java.lang.NoClassDefFoundError: json2xml/bin/pack/EsrJson2Xml (wrong name: pack/EsrJson2Xml) at
    java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClassCond(ClassLoader.java:735)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:716) at java.lang.ClassLoader.defineClass(ClassLoader.java:537)
    at com.sap.aii.ib.server.mapping.execution.MappingLoader.findClass(MappingLoader.java:195)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:372) at java.lang.ClassLoader.loadClass(ClassLoader.java:313)
    I followed some of discussions for the Linkagae error http://scn.sap.com/thread/1418477 but could not help..
    Following are details of my NWDS and PI server:
    SAP NetWeaver Developer Studio
    SAP Enhancement Package 1 for SAP NetWeaver Developer Studio 7.3 SP10 PAT0000
    Compiled the project with JAVA SE-1.6 as well as 1.5
    SAP PO 7.4 Java Only , Release: NW731CORE_10_REL
    SP: 05 JDK: jdk16 Latest Change: 353688
    I have taken care to export all the Jar files used in NWDS to be exported and then imported as Archived files in PI server.
    But could not see the 5 jar files in ESR. I hope there is some issue with name as can see in the log.Can the issue be solved?
    How to test the Operation mapping for Synchronous Message in NWDS?
    Regards
    Rebecca

    Dear Hareesh and Experts,
    I resolved the issue by doing the below steps.
    1. Downloaded the JDK5 and updated the Java console i.e. JRE 15.
    2. I had  created this project using the JAVA Compiler with JAVA SE1.6 initially. Changed this to 1.5 in the Properties of the Project.
    3. Uploaded the project again in ESR Imported Archive.
    The issue is solved.
    Thanks a lot for all your inputs.

  • Set property for  background color for JButton

    I am attempting to change the colors of the UI for JButton. The change does not appear to be taking. The reason appears to be that JButton, and for that matter JLabel setOpaque(false); How can I globally change this to setOpaque(true);
    Second is there a way to save the default property hash table after the changes are made so that it will run the next time the program is executed.

    Thank you for responding. I don't feel that I have been clear in the statement of the problem. I have written a medium size desktop application(20,000 statements). I am trying to customize the color scheme by modifying the default laf properties color entries. I can modify JPanel through a put to the properties hash table. When I attempt to change the background color for JLabel and JButton it doesn't seem to take. I believe that the reason it doesn't take is because opaque(false). Is there a property that allows the overide of opaque to true or do I have to change all of the numerous JButtons in my program.
    I have decided to store all changes in a file and make the changes at the point that the program initializes each time its run.
    I am not looking for specific code but an approach.
    I would appreciate your advice.

  • HT201380 Yesterday this was automatically installed.  Today I can't access a document in Pages.  A prompt says I need a Pages update.  But the next screen tests for updates and informs me everything is up to date.  What's up?

    Yesterday this was automatically installed.  Today I can't access a document in Pages.  A prompt says I need a Pages update.  But the next screen tests for updates and informs me everything is up to date.  What's up?

    It's highly unlikely that the Pages update problem has anything to do with the ARD client update, since the client is not involved in any way with Software Update. I'd suggest asking for assistance with the update problem in the forum appropriate for your version of Mac OS X.
    Regards.

  • SESSION VARIABLES : HOW TO TEST FOR MULTIPLE USERS

    I have a username session variable set up on a localhost testing envirnoment.
    This works fine for one user, but when I open another occurence of the browser (or just another tab) to test for multiple users the system overwrites the session variable with the last username input.
    So the question is:
             Why doesn't dreamweaver hold an instance of the session variable for each browser session? and if not what are your suggestions?
    Thanks
    Adam.

    Thanks for that.
    After scouring the internet I found the only way of running 2 instances of firefox  without them sharing the session variables is to create 2 new firefox profiles in windows + set the MOZ_NO_REMOTE environment variable.
    Internet explorer is much easier as it has a 'new session' option in the file menu, but seems to have more trouble displaying tables correctly.
    Hope this helps anyone with a similar problem.

  • [svn:osmf:] 13916: Added DynamicDRMTrait, Composite Unit tests for parallel and serial compositions.

    Revision: 13916
    Revision: 13916
    Author:   [email protected]
    Date:     2010-02-01 16:42:09 -0800 (Mon, 01 Feb 2010)
    Log Message:
    Added DynamicDRMTrait, Composite Unit tests for parallel and serial compositions.  Bug fixes in CompositeDRMTrait.
    Modified Paths:
        osmf/trunk/framework/OSMF/org/osmf/composition/CompositeDRMTrait.as
        osmf/trunk/framework/OSMFTest/org/osmf/OSMFTests.as
        osmf/trunk/framework/OSMFTest/org/osmf/utils/DynamicMediaElement.as
    Added Paths:
        osmf/trunk/framework/OSMFTest/org/osmf/composition/TestParallelElementDRMTrait.as
        osmf/trunk/framework/OSMFTest/org/osmf/composition/TestSerialElementDRMTrait.as
        osmf/trunk/framework/OSMFTest/org/osmf/utils/DynamicDRMTrait.as

Maybe you are looking for

  • IMac crashing

    Hi guys. Today after streaming a video on a website (I was watching an episode of GoT), I ran a virus scan with Avira and my mac froze. This has happened 3-4 times tonight alone (although it's the first time I've experienced this problem). Safari has

  • In iTunes everytime I purchase it says purchase cannot be completed

    I have $8 left on my iTunes, I cannot seem to use it anymore. I really need help. It says my purchase cannot becompleted and that I need to contact Itunes support.

  • How do i get a output in CSV of a SQL query executed via SQL Command prompt

    Hi All, I have a question with reference to SQL command prompt. I have a sql query which runs properly and gives proper execution in SQL Management console in GUI. This report is used to pull the free disk space report of our servers As i want to sch

  • Script to remotely find IE version across multiple PC's

    Hoping someone can help...I'm very new to Powershell and it seems very powerful, but I'm having trouble to execute commands across multiple pc's.  I can use powershell to find the IE version on my local machine, but I'd like to be able to pull from a

  • Toshiba Portege R705-35 Fails to detect video cam and speakers

    My Portege R705-P35 laptop has stopped detecting my video cam and speakers. I have updated the system Bios, audio (Realtek) and video drivers and recently reformated to reinstall original settings and drivers.  Nothing has worked.  The device manager