Different clickable areas in a JButton

I have made an JButton witch looks like this:
* <----- -----> *
The two arrows are in fact one icon.
Can I make it so that different actions will occur
depending where I click on the Icon? (This is part of an much larger
applet where the button will browse back/forward).
I know I can do this with to different buttons, but can I make it with just one? Preferably without any XY-coordinate system solution.

By the looks of your drawing you can do it quite easily but just catching a mouse pressed event on the button and using the coodinates to determine whether the click was on the left side of the button or the left.
I know you said you wanted to avoid having to look at the coodinates but you are out of luck.
Bryan

Similar Messages

  • Resizing a buttons clickable area

    Good day gentlemen,
    I am trying to make a brain anatomy game in flash CS3 and I am having some difficulty getting the buttons to respect certain proportions. Allow me to elaborate.
    I start with a picture like this one:
    [IMG]http://i38.tinypic.com/2a9dv7n.jpg[/IMG]
    http://tinypic.com/m/beu5uq/2
    And then I bring it into photoshop and make a different layer for each different structure (in the screenshot I only did it for one structure but you get the point)
    [IMG]http://i37.tinypic.com/s2fpq9.jpg[/IMG]
    http://tinypic.com/m/beu5xy/2
    Now what I would like to do is import my .psd file into flash and make every layer a different button. But I don't know of a way to view layers of a .psd file in flash. But here's the bigger problem. As you can see, it makes the "clickable" area for the button a rectangle shape.
    [IMG]http://i36.tinypic.com/x52mar.jpg[/IMG]
    http://tinypic.com/m/beu621/2
    Whereas I would like for it to be the shape of the specific structure. If the clickable area is a rectangle then there is an overlap onto other structures which is not at all ideal. Especially when I get into smaller structures. What I want is for the button to be exactly like the layer in photoshop. Does anyone know how to accomplish this?

    I really want to thank skarthiks for responding. Here is the part I have a hard time with.  Your instructions were clear and nicely stated. But from what you are telling me there is no way for the imported layers to take on the shape they had in Photoshop?
    Here is the link to the video:
    http://www.screencast.com/users/canadian_hockey1/folders/Jing/media/1ac7b639-0272-4f80-9a1 0-91bf1622aa5d
    this is getting rather frustrating because it so simple. Again I want to thank everyone and anyone for responding. It's going to be a rather stupid error that's causing this.
    If you wish to try it yourself, I've uploaded the .psd file on rapidshare here
    http://rapidshare.com/files/414702909/figure_20_week_1.psd
    I really don't see where I'm going wrong. If you require more video/screenshots I will be happy to upload them for everyone

  • Passing a value from Report A to B when B is in a different Subject Area

    I had posted a question previously on how to pass the Dept # from Report A to B when B i in a different Subject Area. The question was:
    Report A is a table on the Dashboard that shows Actual vs Budget results by Department. I want the user to click on the Department and be navigated to report B that shows the detail transactions that make up the Actual results. Report A and B are from different underlying subject areas. Thus when I navigate to report B, I see ALL departments, and not the one I clicked on in Report A to bring up Report B. How can I limit the results in Report B to be just the respective cell I clicked on in Report A?
    I got great advice from Nico on how to use the GO URL, but I can only get that to work if the 2 reports in question are from the same data model. In my case they are NOT.
    The GO URL seems to be working, as it does open up Report B when I click on the Department field in Report A, but it does not pass the Department number to Report B, even though reprot B has that field "as prompted".
    Can anyone definitively indicate whether what I'm trying to do is not possible in BI EE?

    Read this from Venkat... I think this will be helpful in understanding prompts, both the column prompts (Answers) type and the dashboard prompts. Very useful, I think.
    http://oraclebizint.wordpress.com/2008/04/30/oracle-bi-ee-101332-understanding-dashboard-prompts-passing-prompts-to-multiple-subject-areas-aliases/

  • GR/IR Automatic Clearing for Different Business areas items

    Hello All,
         we have different business areas, and some times we create a PO for all business areas and invoice it in a specific business area
    in F.13 automatic clearing:
    for GR/IR account
    Documents with different business area cannot be cleared.
    any idea to solve this issue is appreciated,

    Thanks for your reply,
    I've tried such a solution with more parameters ( EBELN, XREF3 and EBELP)
    but in F.13 :
    - the document cannot be cleared when >>> selecting GR/IR account special process.
    if we treat GR account as a normal GL account, I mean without selecting GR/IR account special process.
    the document can be clear
    i want to be able to clear the document with selecting GR/IR field ( is it possible )
    and if it is not allowed, do we will face a problem by clearing GR account without selecting GR/IR parameter ??
    Many Thanks

  • Creating Sales Order with reference to Quotation from different Sales Area

    Hi,
    I would like to inform you that our customer (GE ENERGY OC) from Europe have a requirement where they want to create sales orders with reference to quotation that is from different sales area. Standard SAP functionality doesn't allow this feature, hence requesting your help to give me an update in this regard.
    Please treat this as urgent as they have to do business cutover where they are in the process of completing open sales orders.
    Thanks
    Ashfaq
    Mobile: +91-98857-07558
    E-Mail: [email protected]

    Hi RadhaKrishna,
    In standard system it is not possible to create sales order from a quotation whose sales are is different.
    However I think this is possible by using some user exit in sales order. I have never tried this.
    Regards
    srini

  • Different sales area for Inter company stock transfer and STO

    Hi People,
                           Is it possible to have two different sales area's for Inter company stock transfer and within the company stock transfer. The problem is in below step
    IMG->MM->Purchase Order->Setup stock transport order->Define shipping data for plants.
    In this step when you define plant as customer, the same plant as customer needs to be maintaind for both STO and Inter company and there is only one entry of sales area possible for this single plant. So, how can the task be achieved.
    I want that STO should be carried out by sales area lets say X/Y/Z
    Inter company should go through A/B/C.

    hi dear,
               It is not possible at all to have two sales area for given Plant in STO.
               What is issue in that u can Transfer any MATERIAL, just need to extend it to given sales area.
    Reagrds
    AJIT K SINGH
    HAPPY TO HELP U

  • Different Business Area in Customer line item while Billing

    Dear Friends,
    We are on Ecc 6.0 and We have a requirement of Different Business Area in Customer line while billing. Since we had defined Business area location wise and requirement is Sundry Debtors should always book to Location as maintained in delivery plant field of sales area data in customer master.
    Requirement:- Our material is assigned to Plant 115.In customer master, sales area data -> shipping tab  -> Delivery Plant (KNVV- VWERKS), we are maintaining "112", Now while billing and while generating Accounting document account entry is
    Customer 1000.00 (Business area=115)
    sales    1000.00 (Business area=115)
    But our requirement while accounting document after billing is
    Customer 1000.00 (Business area=112), system should check and derive the same from TABLE KNVV - VWERKS(DEL PLANT)
    sales    1000.00 (Business area=115).
    Please revert.
    Regards,
    Sandeep

    Dear Friends,
    One can do the same via using a userexit.
    Regards,
    Sandeep

  • Create a sales order with reference to a sales doc of different sales area

    Hi All,
    I would like to create a sales order by copying a sales order of different sales area. Is there way to achieve this (user exit, custom transaction, copy control) if the standard SAP doesn't allow?
    Thanks in advance
    Venkat

    HI venkat,
                   to be  very precise yes ,it is possible to create a sales order referencing the sales order of the same customer from different sales area ,but system has to understand the key field which is differentiated between those two sales areas like say doc type or any other header fields so that ,we can use that field in userexit MV45AFZZ to code a logic ,so that system picks up right sales area depending on your business process.
    mukund

  • Data of different session are not getting refreshed.

    We used select one choice and it is bind to the iterator. Data of different session are not getting reflected.
    Problem Scenario : Two browsers are open with same screen . In browser-1, I am adding new item which display on drop down of same screen. But drop down of browser-2 is not displaying the new added value.
    Please let me know how to refresh the data of browser-2 if I added data on different session.
    //JSFF entry
    <af:selectOneChoice binding="#{backingBeanScope.Product.ICTCSTName}"
    id="iCTCSTName" simple="true"
    label="#{bindings.tpCrudeSuperTypeFindAllPopulatedCT.label}"
    required="#{bindings.tpCrudeSuperTypeFindAllPopulatedCT.hints.mandatory}"
    value="#{bindings.tpCrudeSuperTypeFindAllPopulatedCT.inputValue}"
    autoSubmit="true">
    <f:selectItems value="#{bindings.tpCrudeSuperTypeFindAllPopulatedCT.items}"
    binding="#{backingBeanScope.Product.si2}"
    id="si2"/>
    </af:selectOneChoice>
    //Pagedef entry
    <list IterBinding="tpCrudeSuperTypeFindAllPopulatedCTIterator"
    ListOperMode="navigation"
    ListIter="tpCrudeSuperTypeFindAllPopulatedCTIterator"
    id="tpCrudeSuperTypeFindAllPopulatedCT" DTSupportsMRU="true">
    <AttrNames>
    <Item Value="superTypeName"/>
    </AttrNames>
    </list>

    Are you sure backingBeanScope is the correct scope for your scenario?
    Session scope sound more appropriate to me.
    binding="#{backingBeanScope.Product.si2}"

  • Can i use same customer master record in different sales area

    dear sir,
    i have created a record of customer master - RAM in sold to party account group using sales area - (I).
    (i.e,) XYZ ( sales org ) - A (dis channel ) - XX ( division)
    now i have created another record of customer master - DAVID in sold to party acc group using sales area - (II).
    (i.e) XYZ (sales org) - A (dis channel ) - YY ( division ).
    when i am trying to change SH party function of "RAM" with "DAVID" its throwing an error message that DAVID is not created in Sales Area - (I).
    please let me know how to resolve this
    regards
    vivek

    Hi,
    There are two solution to control this.
    1) Extend customers in respective sales area. i.e.. DAVID in XYZ-A-XX or RAM in XYZ-A-YY.
    2) Define reference sales organisation, channel and division and assign to respective.
    EX.      
    Define sales org. "0000" and assign to all sales orgs.
    Define channel "00" and assign to all channels.
    Define division "00" and assign to all divisions.
    Now create customer masters only in sales area 0000-00-00 and you can use this customer anywhere for any sales area (at transactional level). This is one time activity and will save so much time in creating(or extending) master records in different sales area.
    Thanks,
    Tarpan

  • [SOLVED]dzen clickable areas

    I am using dzen as a status bar in DWM and I want to know how I get the clickable areas to work. I have looked over all the place and I am still confused. Also I am piping conky to dzen.
    Any help would be much appreciated.
    I solved my problem. It just took reading dzen's documentation some more.
    Last edited by xly15 (2012-11-30 21:33:11)

    I am using dzen as a status bar in DWM and I want to know how I get the clickable areas to work. I have looked over all the place and I am still confused. Also I am piping conky to dzen.
    Any help would be much appreciated.
    I solved my problem. It just took reading dzen's documentation some more.
    Last edited by xly15 (2012-11-30 21:33:11)

  • In KA02 screen how can I get different functional area like (Production, Sales, Adminstration etc)

    In KA02 screen how can I get different functional area like (Production, Sales, Adminstration etc)

    Hi,
    Please check below configuration for defining functional areas for cost elements
    SPRO> FI > FI Global settings> company code> cost of sales accounting>Functional area > enter functional area
    Regards,
    Jyoti

  • Same IO or WBS to be used in Different Controlling Area ? Is this possible

    I have a Internal Order say, 10001 of Controlling Area : AAA, in Co code : ABC.
    Can i use the same Internal Order, in Controlling Area : BBB, in code code : XYZ  ???
    Pl. reply
    thanks
    amit

    Hi,
    Numbers of WBS/IO have to be unique through the client (not like cost centres, which could be defined in different CO areas with the same code).
    Regards,
    Eli

  • Inter company postings between 2 different controlling areas

    Dear Team,
    Is it possible the inter-company postings between two different controlling areas company codes with same chart of accounts?
    profit center accounting and New GL is activated for the company codes.
    Please provide me the inputs if anybody gone through the above scenario.
    Regards,
    Ravi

    Hi Hrusikesh,
    Thanks for your inputs, but when i try to post inter company posting between two different company codes assigned to two different controlling areas through F-02. I am getting the below profit center error is coming.
    Profit center aaaa/1234 does not exist for 11.04.2014
    Message no. KM700
    Diagnosis
    The profit center does not exist in master data table CEPC for the date specified.
    Procedure
    Check your entry. If necessary, you must create the profit center for the date required.
    Is it possible the IC postings between two different company codes assigned to two different controlling areas?
    how we can meet the above requirement, please let me know if any one of you follow the above scenario.
    Regards,
    Ravi

  • Document Splitting with Different Business Area

    HI
    I have a situation, where i need to create a new document type and it needs to be configured in such a way that vendor invoices and credit notes can be booked with the correct doc splitting and using different Business Areas.
    I like to know if this is possible, and if yes how.
    Earlier the client used to post the transactions, with different business areas, as we get only a warning message to reset the business area of the vendor.
    Now that we have activated New G/L accounting, with document splitting we get the warning message,
    but then the profit center will not balance, so we have an error.
    The client requires that they need to post to a different business area, and the document splitting should happen.
    Any suggestions on this will be great.

    Hi Srikanth,
    In my config setting under Document Splitting i have the Zero Balance ticked for it.
    My Scenario is as an Ex. I am debiting a G/L account for 1000, and giving Business Area X, with a cost Center which is assigned to Business Area X.
    And Crediting a Vendor for 1000 with Business Area Y.
    Will this scenario work with Document Splitting enabled, i am doubtful on this, but my client needs this.
    Can you tell me if this is a possible scnerio.
    If yes then how?

Maybe you are looking for