If my component has more then one button,how to create click events

I am learning about java beans
My java class
public class ButtonClass extends JButton implements Serializable{
// ButtonHandler bh;
public ButtonClass() {
setText( "Hello world!" );
setOpaque( true );
setBackground( Color.ORANGE );
setForeground( Color.BLUE);
setVerticalAlignment( CENTER );
setHorizontalAlignment( CENTER );
// addActionListener(new ButtonHandler(new JTextArea("Hello")));
But i want to create Bean having more then one button on my bean.
But how to create event individually for each button

Do you mean how do you process each event from the buttons and know which button casued the event?
If that is what you mean then look at ButtonGroup. You can add the same mouselistener to each button and then check which one cause the event:
myButtonEvent.getButton()

Similar Messages

  • Question on the rpd has more then one connection pool

    Here is a question: I have create a dedicated connection pool for rpd metadata translation, the user guide says that connection pool will used only for translation,
    but when I view data from the table it make me to select a connection pool,
    so when the rpd deployed to server , how does the server decide to use which one to query data which one for the translation?

    Hi,
    When you create variables then separate connection pool plays a major role. And while creating variables you are made to choose a connection pool. So when ever the variable is called then the connection comes into picture. Same works for translation too.
    Please let me know further and hope this helped/ answered.
    Regards
    MuRam

  • Digital Signature more then one BinarySecurityToken? without SignatureValue

    Hello together,
    XI7.0 calls an external webservice using SOAP. The communication runs successfully without any warning. But! The messages must be singed and encrypted.
    Iu2019ve configured signature authentication. The signed messages can not being processed by external web service. The error is:
             <faultcode xmlns:ns1="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">ns1:SecurityTokenUnavailable</faultcode>
             <faultstring>Referenced security token could not be retrieved (Reference "#sap-23")
    The output of SOAP Adapter contains 3 BinarySecurtyToken blocks, which are similar! But only one of it has SignatureValues. I mean it can be reason of the error.
    My question is:
    Is it possible that Security Tag has more then one BinarySecurityToken? The message is signed with PKCS#12 key, which contains 3 certificate chains.  But If I take another private key without any certificate chain (self-signed) I have the same problem: 3 Binary SecurityToken.
    So the question: How many Token are possible within Security Tag?? Why? If not what have I to`do?
    Here is an outout of SOAP Adapter.
       <SOAP:Header>
             <wsse:Security xmlns:wsse='http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd' SOAP:mustUnderstand='1'>
                <wsse:BinarySecurityToken xmlns:wsu='http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd' wsu:Id='sap-3' ValueType='http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3' EncodingType='http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary'>SIGNATURE </wsse:BinarySecurityToken>
                <ds:Signature xmlns:ds='http://www.w3.org/2000/09/xmldsig#'>
                   <ds:SignedInfo>
                      <ds:CanonicalizationMethod Algorithm='http://www.w3.org/2001/10/xml-exc-c14n#'/>
                      <ds:SignatureMethod Algorithm='http://www.w3.org/2000/09/xmldsig#rsa-sha1'/>
                      <ds:Reference URI='#wsuid-body-51cf5350-ab2e-11dd-9ef0-00144fa86689'>
                         <ds:Transforms>
                            <ds:Transform Algorithm='http://www.w3.org/2001/10/xml-exc-c14n#'/>
                         </ds:Transforms>
                         <ds:DigestMethod Algorithm='http://www.w3.org/2000/09/xmldsig#sha1'/>
                         <ds:DigestValue>E99gPpCexjdz7tk+wWp92r4DYNA=</ds:DigestValue>
                      </ds:Reference>
                   </ds:SignedInfo>
                   <ds:SignatureValue>SIGNATURE VALUE </ds:SignatureValue>
                   <ds:KeyInfo>
                      <wsse:SecurityTokenReference>
                         <wsse:Reference URI='#sap-23'/>
                      </wsse:SecurityTokenReference>
                   </ds:KeyInfo>
                </ds:Signature>
                <wsse:BinarySecurityToken xmlns:wsu='http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd' wsu:Id='sap-23' ValueType='http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3' EncodingType='http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary'> SIGNATURE</wsse:BinarySecurityToken>
                <wsse:BinarySecurityToken xmlns:wsu='http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd' wsu:Id='sap-23' ValueType='http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3' EncodingType='http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary'>SIGNATURE </wsse:BinarySecurityToken>
             </wsse:Security>
          </SOAP:Header>
          <SOAP:Body xmlns:wsu='http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd' wsu:Id='wsuid-body-51cf5350-ab2e-11dd-9ef0-00144fa86689'>
             <ns1:Request xmlns:ns1='http://blabla.com /'>
                <a></a>
             </ns1: Request>
          </SOAP:Body>
       </SOAP:Envelope>
    If anybody has done it have an idea how to do it please let me know.
    Thank you!! Anna

    Dear Anna
    I also need to use the similar soap header to call synchronous web service from PI 7.3 dual stack.
    I am trying to achieve this through receiver soap adapter with webServiceSecurity profile.
    I have done the required config on receiver agreement but still not able to get the digital signatures.
    I really appreciate if you can provide any pointers on this.
    Thanks
    Sapna

  • How to invoke more then one service from single button click

    Hi,
    I have created web service data control which contains more then one services.
    Now my problem is when I press button, it should take data from my input component and needs to set into multiple services and response of those services should be display to my binding component on the screen.
    Regards,
    DevangD

    See : 9.11 Overriding Built-in Framework Methods
    here: http://download.oracle.com/docs/cd/E12839_01/web.1111/b31974/bcservices.htm#sm0222
    You can have the code that was generated modified to invoke an additional action - you'll need to add the binding to that action to your page.

  • Object would have more then one attribute with the tag :VALUE

    I'm creating a new component in Ultiboard - a 100 pin connector.  This connector (Hirose) has 4 rows of 25 pins. Alternate rows are staggered. I'm trying to name each pin with it's appropiate name: A1, A2, A3 ....A50. Then B1, B2, B3 .....B50.
    When I change the VALUE or NUMBER attribute, I get the DRC error  message:
    This action cannot be completed because the resulting Object would have more then one attribute with the tag :VALUE
    Please remove one of the attributes and try again.
    Okay, so I've tried deleting the tag and now I can't name the pin at all. 
    What am I missing?

    You should be in the footprint editor to edit the pin name.  Select tools>>Database>>Database Manager, highlight the component in your database and click on the Edit icon.  In the footprint editor, double click on the pad and a SMT or THT pin Properties dialog appears, select the Attributes tab and highlight the Number row, press the change button and you should be able to change the pin name.   
    Tien P.
    National Instruments

  • An operation has more than one setup activity-error message

    Hi All,
    I have a queue which is failing and giving error message "An operation has more than one setup activity".
    I have  debugged it but of no use.
    In SAP R3 planned order data is created and is being sent to APO system through a CIF interface in queue.
    In APO system,planned order data is integrated to process order,during this they are getting the subject mentioned error.
    Kindly help me how to rectify this error.
    Please help...Thanks in advance.

    Hi,
    Back again...hopefully below should solve your issue.
    Check if any of the co-product (of the main assembly) has GR processing time. Are there any phantom component in the BOM, if yes, please check the co-products in phantom assembly as well.
    Any co-products /phantom assembly should be assigned to APO related Produce phase.
    Otherwise, you can remove the GR processing time for co-products (make it zero) and sync the master data and then try.
    This should solve the issue.
    Let know if this helps.
    Regards,
    NR

  • Print more then one pdf in window

    Hi, i use print preview for printing one pdf in crm, for one pdf everything works fine, but i need print more then one pdf in one popup window, any idea how to do it ?

    Hi, i describe process i have 4 adobe forms: - agreement 1 - agreement 2 - attachment A - attachment B user click on button print preview, popup windows is show, on this popup windows user have to choose one of  two adobe form (agreement 1 or agreement 2) after choosing adobe form, form that has been selected is printed in and display in new popup windows but sometimes, depending on the circumstances i have to print form that has been selected by user and attachment A (or/and) attachment B I wonder if there is the possibility to merge this 2 or 3 pdf in on pdf ?
    I use this code:
    * Create PDF Object.
       data: l_pdfobj type REF TO IF_FP_PDF_OBJECT.
       l_pdfobj = l_fp->create_pdf_object( connection = p_dest ).
    * Set document.
       l_pdfobj->set_document( pdfdata = fp_out ).
    * Execute, call ADS.
       l_pdfobj->execute( ).
    * Get result.
       l_pdfobj->get_document( importing pdfdata = fp_out ).
    maybe i can add pdf to the l_pdfobj.... but i don't know how,
    right now l_pdfobj get only one pdf.

  • How can I restrict more then one user to access the table?

    Hi !
    I have a problem and two solutions and I am a bit confused as to
    which one is the best one and/or can there be any better way of
    handling the problem ?
    Problem : I have to update a key field of a table when I update
    it in the form 5.0 screen. I am basically doing a maintenance of
    a table and if a certain field is updated then the change has to
    be reflected in two more tables. But the issue is that the field
    is a part of the key in those two tables. So all I can think of
    is that I need to insert new set or rows for that new value of
    the field and delete the old set of records for old values of
    the field.
    There are two ways of doing it;
    1.One option can be to explicitely define two cursors separately
    and fetch the values in them one by one and then insert the new
    records and then delete the old records in both the tables. This
    I feel will be a cumbersome process both in terms of processing
    time and the coding.
    2.Second option I was thinking can be to create two flat tables
    (without keys) and insert the values in them and update the
    changed field there and then insert the rows in the respective
    tables. Delete the old records in the main tables and delets the
    records in these flat tables. This is a bit more faster and
    easier to predict and code. This seems to be a better option for
    me.
    Any comments on these ?
    In both the cases I was thinking of making some provision so
    that more then one person can't update the table simultaneously.
    Since if there are more then one persons doing the processing
    then some inconsistency might creep into the whole process.
    This is easier to do in the second process as if I check the
    data in the flat tables and if there is some data then I can
    presume that some one is doing the processing and I can ask the
    other person to hold for a while. But in this case how can I
    stop more then two people to simultaneously check for the empty
    table and start inserting the record ?
    I was just thinking of having a sepatare table having only one
    field and this will be a key field and as the process begins the
    process will insert a fix value say 'Y' in the key field and at
    the end of the process the record will be deleted and this way
    we can restrict the user to access the process more then one at
    a time..? Since you can't have same value of the key in a table
    more then once.
    Any better way of handling it will be deeply appreciated.
    How about locking the table at the begining and releasing the
    lock at the end ? Will there be any issue in that? since I am
    inserting and deleting the rows in the same transaction.
    Comments welcome,
    Shobhit
    null

    How about performing the update IN the database using a stored
    procedure?
    By using non-database fields on your form to get the
    information, you can then call the procedure in the database to
    perform the updates. If an error occurs in the procedure you
    rollback, if necessary, and send a message or status back to the
    form. If it succeeds you might wish to commit and then re-
    execute the form's query -- using either the original key values
    or the new key values...
    null

  • Is there a way to Search (List search) for more then one field text from a column for Bulk uploading?

    I've been trying to find more information on this and I apologies if this has already been answered. I just don't know the correct way to ask this. We have a SharePoint List at the company that we have people input information into different columns. The
    problem is most of those information are very repetitive. Is there a way for me to search more then one field text in the column and just input that same information in?
    ex:
    Column 1
    Column 2
    Date:
    883851
    MidWest
    User input 
    8831518
    MidWest
    User input
    On the search field in the SharePoint List, I would need to search for 883851, 8831518 etc,  would view those requested numbers, then I would click edit and change dates to those rows. Does that make sense? I'm sorry I'm fairly new at sharepoint.

    I think what you're asking is about having repetitive options in a list, show up easily for new items being created.
    This can be done by setting the columns that contain repetitive information to Choice fields.  In the configuration of the Choice field, check the box for "Allow custom values".  Now as users are entering data into the list, the dropdown of options
    for a given field grows and users can quickly see and select previously entered and thus repetitive values for the given fields.
    I trust that answers your question...
    Thanks
    C
    |
    RSS |
    http://crayveon.com/blog |
    SharePoint Scripts | Twitter |
    Google+ | LinkedIn |
    Facebook | Quix Utilities for SharePoint

  • How to add more than one button control on import of skin?

    I am importing a skin from photoshop that I customized and exported.  For my particular project I need more than one button type with different sizes, dimensions, colors, etc.  In example the buttons for the navigation are going to be different than buttons to print, or email, and buttons that are bigger for the main custom component also need to be different.  I tried changing the naming convensions in the .PSD file but I can't get it to export more than one button type.  Is there a way to do this? 
    Thanks,
    Ryan

    hi,
    even i am searching for some thing similar.
    i want to have 3 calendars in one page.
    getting same message calendar already exists on page 2. You can only add one calander per page. Select a different page.
    pls help.

  • How do I select more then one channel to view in tdms file viewer graph panel

    I have a TDMS file that I can view with the labview 2013 TDMS file viewer and I can select one signal out of 15 signals to view on the graph panel. however I would like be able to look at 2 or 3 signals
    on the same graph but can't seem to be able to select more then one signal at a time. Is there a way to select more then one to view?  

    I've modified the TDMS viewer in the past to allow selecting multple channels.  It's a little bit of a pain because the tree control in the viewer only allows you to select one item.  You have to edit the tree to allow multiple items.  Now your selection is an array instead of a scalar.  This means the rest of the code has to be updated, and the references to the tree in subVIs need to be updated.  Not impossible but it takes some time.  Alternativly open it in Excel with the free add-in then you can select the two columns you want and insert a graph.  Not as simple for the user but using Excel, which users should be familiar with might mean users need less training on data files.
    Unofficial Forum Rules and Guidelines - Hooovahh - LabVIEW Overlord
    If 10 out of 10 experts in any field say something is bad, you should probably take their opinion seriously.

  • Auto creation of child requests when parent request has more than one group

    Hi,
    I have created a request dataset which has a child form for AD Group. While raising a request, if I add more than one group, how to process the approval flow. Because I will be having different different approvers for different different groups. Is there any way to create child requests automatically when we submit a request with more than one group? I am using OIM 11.1.1.5.0.
    I know in OIM 11g, whenever user raises request for more than one beneficiary/target-resource then OIM breaks that request into Child Requests. But this is not happening when I add more than one group in the same resource. Do I need to write my own code for DataValidator to split parent request into child requests upon validating child form? If so, is it going to impact the existing feature which is creating child request when parent has more than one user/resource.
    Please let me know.

    No not possible OOTB in current version. Check {thread:id=2318652} for more information.
    -Bikash

  • How can I talk with more then one person at a time?

    How can I talk with more then one person at a time? With Faxe time? Is thier software needed to do this or can it be done with the basic package?

    You can get the drop down list by either right-clicking on the back/forward buttons, or holding down the left button until the list appears.
    If you want the drop-down arrow you can add it with the Back/forward dropmarker add-on - https://addons.mozilla.org/firefox/addon/backforward-dropmarker

  • How to use 'BAPI_GOODSMVT_CREATE'  for more then one row selected ???

    Hi,
    I am using bapi , BAPI_GOODSMVT_CREATE  ,  my requirement is that first perform ALV display with check boxes & then user can selsct any number of rows  & then on clicking execute button  this bapi is triggered , now my ques is that  if i am selecting rows one by one & executing , then am able to post data successfully, but if am selecting  more then one row at a time then its giving me error
    " exactly one serial no must be selected  (instead of more then two / three ) ."
    plz help me .
    this is how i am filling data in BAPi & bapi call
    FORM FILL_BAPIDATA .
      wa_GOODSMVT_HEADER-PSTNG_DATE = sy-datum.
      wa_GOODSMVT_HEADER-doc_DATE = sy-datum.
      wa_goodsmvt_code-gm_code = c_gmcode.
      LOOP AT it_final INTO wa_final.
        wa_GOODSMVT_ITEM-MOVE_TYPE = c_movtype.                 " '313'.
        wa_GOODSMVT_ITEM-material =  WA_final-MATNR.
        wa_GOODSMVT_ITEM-ENTRY_QNT = wa_final-verme.
        wa_GOODSMVT_ITEM-plant =  WA_final-WERKS.               "'DB10'.
        wa_GOODSMVT_ITEM-STGE_LOC =  WA_final-LGORT.
        wa_GOODSMVT_ITEM-BATCH = WA_final-CHARG.
    wa_GOODSMVT_ITEM-BATCH = l_charg.
        append wa_GOODSMVT_ITEM to IT_GOODSMVT_ITEM.
        clear: wa_GOODSMVT_ITEM.
      ENDLOOP.
      LOOP AT it_final INTO wa_final.
        wa_serialnumber-SERIALNO = wa_final-sernr.
        APPEND wa_serialnumber to it_serialnumber.
        CLEAR wa_serialnumber.
      ENDLOOP.
      LOOP AT it_position2 INTO wa_position2.
        wa_serialnumber-MATDOC_ITM = wa_position2-wepos .
        MODIFY it_serialnumber INDEX sy-tabix from wa_serialnumber TRANSPORTING MATDOC_ITM .
      ENDLOOP.,
    data: begin of mthead.
            include structure bapi2017_gm_head_ret.
    data: end of mthead.
    CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
        EXPORTING
          GOODSMVT_HEADER               = wa_GOODSMVT_HEADER
          GOODSMVT_CODE                 = wa_GOODSMVT_CODE
       IMPORTING
          GOODSMVT_HEADRET              = mthead
        MATERIALDOCUMENT              = w_MATERIALDOCUMENT
        MATDOCUMENTYEAR               = w_MATDOCUMENTYEAR
        TABLES
          GOODSMVT_ITEM                 = IT_GOODSMVT_ITEM
          GOODSMVT_SERIALNUMBER         = IT_SERIALNUMBER
          RETURN                        = IT_RETURN
      GOODSMVT_SERV_PART_DATA       =
      EXTENSIONIN                   =
    APPEND w_MATERIALDOCUMENT to it_GOODSMVT1 .
    IF sy-subrc = 0 .
      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    *MESSAGE text-016 TYPE 'I'.
    PERFORM msg_log  .
    ENDIF.

    Hi,
    Did u check the serial numbers table before calling the BAPI. Might be the case tht same serial number is assigned for all items, in this case the goods movement may be possible with same serial number for all items.
    Reagrds,
    Aditya
    Edited by: aditya on Aug 11, 2009 11:46 AM

  • Can you connect more then one external screen to a mac with one mini display point?

    Does any one know if you can connect more then one external screen to a mac, with one mini display point?

    This company has a dual monitor solution for DisplayPort;
    http://www.matrox.com/graphics/en/products/gxm/dh2go/

Maybe you are looking for

  • Help! I can't get USB to work

    Ok at first I was having problems with running any 3d games.  I still have this problem.  What it does is it totally freezes the system during the middle of play at random spots.  Then I decided what the heck I guess I need to get all the new drivers

  • Force Acrobat 9.4 to use 8.5" by 11"?

    Scenario: A user scans several documents to jpg format, then attempts to combine them into one pdf using Acrobat 9; some of the scanned docs are typical letter-size (8.5" x 11"), yet some others are much smaller (say, 4" by 4"). When the pdf is creat

  • NotSerializableException reading file from configuration adapter

    Hi! When I try to access a file with config.getFile() that is stored in VA configuration adapter I get a P4BaseRuntimeException with an underlying NotSerializableException. This is what I'm doing: Context ctx = new InitialContext(); ConfigurationRunt

  • Video playback from iTunes keeps pausing

    Just bought an ipad air and synced it with my itunes. However video playback keeps pausing and I have to either restart the video app or rewind a minute or so to get it to keep playing. Even then it doesnt always work. Any ideas what the problem may

  • Free Skype Calling on The iPhone?

    I'm wondering since Skype is an online application and therefore uses internet resources, if I can make calls through Skype for free? I wouldn't think this to be a problem since Skype is easily available online and the iPhone has Safari. Then i'm ass