Two different ways to show a JPopupMenu - the differene

Hi!
I am wondering what the difference between these lines are:
myTable.setComponentPopupMenu(tablePopupMenu);and
tablePopupMenu.show(myTable, evt.getX(), evt.getY());I have noticed that if I use setComponentPopupMenu(Component c) in a MouseListener for a JTable, I can just select a row once. I´m sure there are solutions for that, but stComponentPopupMenu must be harder to work with than a JPopupMenu.show() method. Am I right?

Again, have you read the API. This method was added to make it easier. Well, the API says if you set a popup menu to a component, then it will pop up (depending on the bindings).
If I use the JPopupMenu.show() method in a mouseListener, it will also pop up. I can not see the difference. It is still the same amount of code, just one row.
I just discovered when I was trying with my NetBeans application (almost generated code) and my own written code, that in my own code I was using a mousePressed method and in the NetBeans application a mouseClicked. The functionality of both the codes are now the same after I have changed to mousePressed in my NetBeans application.

Similar Messages

  • How can I align two different text row in the same table in two different way (one centered and the other one on the left)?

    Hi,
    I want to center two different text row that are in the same table but one on the center and the other one on the left. I put a <span> tag hoping that it has been overwhelmed the table's class properties The .bottomsel's font-family and the .Cig84's font-family and colour work but the text-align don't: they're both on the left.
    These are my source and CSS codes:
    Source:
    <table width="600" border="0">
      <tr>
        <td class="bottomref"><p><span class="bottomsel">| <a href="index.html" target="_self">Main</a> | <a href="about.html" target="_self">About</a> | <a href="clients.html" target="_self">Clients</a> | <a href="contact.html" target="_self">Contact</a> |</span><br />
          <span class="credits">Credits: <span class="Cig84">Cig84</span></span></p></td>
      </tr>
    </table>
    CSS:
    .bottomsel {
      text-align: center;
      font-family: Georgia, "Times New Roman", Times, serif;
    .credits {
      text-align: left;
    .Cig84 {
      color: #F00;
      font-family: "Comic Sans MS", cursive;

    Use paragraph tags with CSS classes.
    CSS:
         .center {text-align:center}
         .left {text-align:left}
    HTML:
    <table width="600" border="0">
      <tr>
        <td class="bottomref">
              <p class="center">This text is center aligned</p>
              <p class="left">This text is left aligned</p>
        </td>
      </tr>
    </table>
    Nancy O.

  • Two different ways to execute a custom method in an Application Module

    I have a custom method exposed in an Application Module's Client Interface, and i know two different ways of executing it from my ADF Faces project (both works fine):
    1) Calls the method directly through the Data Control:
    MyModule service = (MyModule)JSFUtils.resolveExpression("#{data.MyModuleDataControl.dataProvider}");
    service.myMethod();
    2) Adding a Method Action in the PageDef's file:
    <methodAction id="myMethod" InstanceName="MyModuleDataControl.dataProvider"
    DataControl="MyModuleDataControl" MethodName="myMethod"
    RequiresUpdateModel="true" Action="999"
    IsViewObjectMethod="false"/>
    //Call the method from the binding container
    BindingContainer bindings = getBindings();
    OperationBinding operationBinding = bindings.getOperationBinding("myMethod");
    operationBinding.execute();
    Basically i want to know: what are the differences (pros & cons) of each approach ??

    Hi,
    In my opinion the second way have a advantage, which its method could be invoke automatically using a invokeAction on pageDef, if necessary.
    regards

  • Create bid invit. from template in two different ways has different consequ

    Hi everybody
    "Create bid invit. from template in two different ways has different consequuences"
    When I create a bid invitation from a previous template, from the template search results (Icon_create SAPLBBP_BID_INV 1010) my bid is published but then stay in the model search and the status is wating for approval. But no workflow started in BBP_PD.
    If I use the same template for creating a new bid from the detail using the create bid invitation button, the bid invitation is created correctly.
    I have configured the two events for the BUS2200 object and both of them have an initial condition.
    It seems that the two actions trigger different events or something like that
    Does anybody why it is occurring this and how I could link the workflow without approval for this case.
    Thanks

    Hi
    What SRM version are you using ?
    <b>Please see these SAP OSS notes / links, which might help -></b>
    <u>Note 976752 - Bidding Worklfows are not triggered correctly
    Note 941417 - Creating a bid invitation from template in the background
    Note 971752 - Incorrect approval preview in bid approval
    Note 741372 - Separating template search from bid invitation search
    Note 764028 - New bid invitation items not visible in bid
    Note 996907 No approval preview for bid after note 976752
    Note 765771 Workflow error when creating a purchase order from bid
    Note 790930 No warning message in case of jump from bid</u>
    Regards
    - Atul

  • How to write a case statement for the totals column of two different years (2013 and 2014) of the same month so that I can get a +/- column

    Please Help!!!
    How to write a case statement for the totals column of two different years (2013 and 2014) of the same month so that I can get a +/- column.
                                      January 2014         January
    2013                            +/-
                    Region   Entry   Exit  Total    Entry   Exit   Total   (Total of Jan2014-Total of Jan2013)
                    A               2         3      
    40        5       7        30                    40-30= 10

    What is a table structure? Sorry cannot test it right now..
    SELECT <columns>,(SELECT Total FROM tbl WHERE Y=2014)-(SELECT Total FROM tbl WHERE Y=2013)
    FROM tbl
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • I recently got a MacBook Pro and was interested in downloading Lightroom that I had previously purchased however there is no disk drive on my pro so was wondering if it is possible to download a different way without having to purchase the program again?

    I recently got a MacBook Pro and was interested in downloading Lightroom that I had previously purchased however there is no disk drive on my pro so was wondering if it is possible to download a different way without having to purchase the program again?

    Lightroom - all versions
    Windows
    http://www.adobe.com/support/downloads/product.jsp?product=113&platform=Windows
    Mac
    http://www.adobe.com/support/downloads/product.jsp?product=113&platform=Macintosh

  • HT204053 can two different apple ids be used for the same imatch

    can two different apple ids be used for the same imatch homesharing for music

    Welcome to the Apple Community.
    No.

  • Can you have two different users with itune accounts on the same computer?

    Can you have two different users with separate itune accounts on the same Ipad?

    Yes, create another user profile on the computer and each user can log into their own profile that way.

  • Route calls to two different CSQs, but show single set of Service Level stats on report

    We have a single node UCCX 9.0.2 Premium environment to handle our ACD operations.  Our agents take inbound customer service, claims and sales calls for a few dozen of our clients.  All of these calls are currently taken by the same two teams of people regardless of which client it is for, with the sales calls going to one team and the customer service and claims calls going to the other team.  There is a Sales CSQ and Skill for each client, and a Customer Service CSQ and Skill for each client.  Currently the caller is presented with a menu giving two options...press 1 for customer service, press 2 for sales.
    What we are looking at doing is adding a third prompt specifically for claims.  Claims issues are handled by the Customer Service team, but only certain members of the team.  Obviously I can create a new CSQ and Skill for Claims for each client, then have the new prompt route to the CSQ for Claims.
    The challenging part is the reporting for this.  We have to report Service Level statistics for Customer Service calls (but not sales) for each client, to show whether or not we're meeting the service level agreement requirements.  The splitting out of claims calls to be handled by specific people is something being requested by our internal management, not the client.  But as far as the client is concerned those are customer service calls, they would count toward our customer service SLA, and they expect to see a single SLA statistic reported.
    I know that it's only possible to add multiple skills to a CSQ and force agent selection based on a specific skill in CCE (not available in CCX).  But is there any way to script my way around this to get the same end result, and have the reporting data still reflect a single set of CSQ service level stats?

    Thanks Aaron.  We're running HRC right now, but I've been dying to switch us to the version of CUIC that's built in to CCX for quite a while and it appears I may be able to do so soon.  I'm hoping to utilize some of the additional flexibility of the saved reporting templates in CUIC to massage the data formatting as needed.
    CUIC Premium is something our management will be considering, but I'm anticipating the license for it being very expensive and probably causing them to eliminate it as an option.  Unfortunately I haven't been able to get my hands on a demo copy of it to try to "sell" it to them either.
    Thanks again for your help Aaron.

  • Two different accounts to be posted for the same valuation class on PGI

    Hi Experts,
    Please note that we want to post two different accounts for the stock offset entry( based on the nature of customer ) in the transaction of PGI in SO. However the valuation class is the same as the nature of the material is same (only the nature of customers is different). We have put one of the two accounts in OBYC GBB - VAX and GBB - VAY.
    Is it possible to have two offset accounts on PGI for the same valuation class.If yes, how will the system identify which one to be posted to.
    Thanks in advance for answers..
    KJU

    hi
    why not create two asset class to easily to separate two situations for two company codes? just a suggestion
    or
    maintain one depreciation key for asset class as a default, if for another company code, just change the depreciation key manual when creating asset master. it is not very complicate.
    or
    create two depreciation areas, one for each company code, then, you will have one useless depreciation for each company code -- not a resonable way
    and, yes, that is the limitation of substituion in AA.
    best regards, Lawrence

  • Fetch records from two different dbs and show it in a single af table

    Hi,
       I have a requirement, such as say, there are two databases having their own employees table. I need to query them both and show them in the UI using the af table tag. Any idea how this can be achieved efficiently please ?
    regards,
    Vijai

    Hi,
    Always mention your JDev version. Are you going to make the resultant data as read-only? If yes, you can create a db link pointing to another schema, and then use union all to merge the data in the query of the VO.
    Ex:
    select col1, col2, col3 from table1
    union all
    select col1, col2, col3 from table2@db_link_pointing_to_diff_schema
    -Arun

  • Can TWO different Zen Micros be installed on the same computer w/o confli

    I have a Zen Micro 5G, and would like to buy a Zen Micro Photo 8G as well. Does anyone know if there will be conflicts to install the software (firmware?) on the SAME computer? I had conflicts when I tried to install two different Palm Pilots on the same computer - the software of the first Palm no longer worked properly. Perhaps the new one "overrides" the first? I don't know if this might happen with the Zen Micro and Micro Photo.
    Also, does anyone know if the Micro Photo fits into the Zen Micro Traveldock?
    Thanks so much for any insight you can offer!

    SilentC wrote:
    I have a Zen Micro 5G, and would like to buy a Zen Micro Photo 8G as well. Does anyone know if there will be conflicts to install the software (firmware?) on the SAME computer? I had conflicts when I tried to install two different Palm Pilots on the same computer - the software of the first Palm no longer worked properly. Perhaps the new one "overrides" the first? I don't know if this might happen with the Zen Micro and Micro Photo.
    Also, does anyone know if the Micro Photo fits into the Zen Micro Traveldock?
    Thanks so much for any insight you can offer!
    I don't think they will conflict because if you use mediasource, you can have different music libraries etc...
    I believe the microphoto fits the traveldock, but don't hold me to it

  • Two Different Imported TIFFs Show The Same Image in Premiere Pro

    I noticed sometime ago that some imported TIFFs with alpha channel are not showing the correct image. Recently I upgraded to Premiere Pro CC (for PC) to see if such issue was solved, however it is not.
    Basically just importing the TIFFs into the project panel results in Premiere showing the same text even though the actual TIFF files contain different text. This is quite bizarre. No other software (including FinalCut Pro) displays such odd behavior.
    I have uploaded the two TIFFs that replicate this issue consinstently here: https://drive.google.com/folderview?id=0B2IT1EAcyLlBZXRlMDkxNzY3d1U&usp=sharing
    To replicate, just create an new empty project and import these two TIFF files. You will notice that both show the same text within Premiere while outside they indeed show the different data.
    Anybody has any clues on why this is happening and on how to solve it?
    Thanks in advance for any help and clues.
    Valerio

    Thanks for your reply.
    At this moment we can't export PNGs with an Alpha channel so we are stuck with TIFFs.
    It is a bizarre issue though.
    Here is a Dropbox link for the images, seems Google Drive download links are buried deep:
    https://www.dropbox.com/sh/gktixc0cdbhr3oz/jPCI8yciY-

  • Iphone 4s freezing at start up then shuts off and keeps restarting then repeating that process over and over. I have tried to reset the phone two different ways and still this problem occurs after I update it or turn off the phone.

    yes the title says most of what is going on.
    I recently reset my phone, losing all contacts and pictures. It was working fine, then after I updated it, it will not turn on completely.
    It starts up with the apple logo
    -goes to the ios 6 (please slide to open) screen
    -then shuts off
    -and repeats the process unless I shut the phone off manually
    I have tried to hold the lock and the home button down to manually reset the phone
    I have also tried reseting the phone completely previously, and I still have this problem.
    Any ideas?
    Thank you!!

    I really don't have an answer for that one. I guess that while trying to get things working correctly, I would use the most basic monitor I had which in your case would be the Eizon using the Thunderbolt port and adaptor.
    When you boot into Safe Mode the startup is quite slow, but you should get the Apple logo and then the spinning gear below it (release the SHIFT key when it appears.) Then after a little more time you should see a gray progress bar appear below the spinning gear. When that disappears the computer will startup to a login screen.

  • In my itunes library I have apps for the ipod.  All of the apps were together, and now I have two different sections to my apps. The first one says 44 apps and the second section says 143 apps.  When I connect my ipod only the first section goes on

    can anyone help me with my apps on my itunes.  They have separated for some reason.  I have one section of 44 apps and the other has 121 apps. Only the top section will sinc with my ipod because at the side where it says apps, it is only showing the 44 apps and not the section at the bottom

    Can you take a screen shot of the iTunes screen and post it? I do not really understand what you  mean by different sections.
    What model iPod and iOS do you have? Maybe the section that does not sync are not compatible with the iPod.
    Were all the apps purchased with one account?
    Do you have any Restrictions one that would prevent syncing? Settings>General>Restrictions.

Maybe you are looking for

  • Assinment of pricing procedure to doc type

    Hi friends, I am new to MM , how the pricing procedure is assigned to doc type, or how the pp is triggered in PO. Thanks madhu

  • How can I add a header/footer to a document?

    I am using Adobe X Standard, version 10.1.2 and everything I am reading tells me to go to tools>pages>Header & Footer>Add Header & Footer, but once I click on tools to the left, the only options I have are export and create pdf files and send files.

  • Infoset doesn't  show up

    Hi, I have created InfoSet. It doesn't show up under the application info area in BEX. Please let me know is there any settings am I missing here.

  • How to know the VKM3 released orders or deliveries in ABAP

    Hi I want to know how can one know whether the given order or delivery is released through VKM3. Is their any indicator set in ABAP tables Regards Nikhil Jain

  • Disaster Recovery (DR) Setup

    Hi All, I need to have a fail-over system for BODS so that if Prod goes down, the DR version can take-over as soon as possible. Whereas I can install BDOS on the DR box, and setup SQLServer replication for the database itself fro repositories etc, wh