How to popup a menu when rigth button clicked?

Hi, i have a mouse listener on a Jtree, it is working fine and now i want that when the user clicks in the right button of the mouse, a popUp menu appears with diferent options depending on the type of node....i only need to know how do make the menu to appear...
thanks

I have had this same problem. For me it always occurs on Mandrake (I've only tried 8.0 and 8.1), but I have never had it occur on other Linux distributions such as Red Hat or Debian.
Quick caveat: Although Sun says that this is not a
bug I have installed Java on 5 different computers
with various versions of Mandrake Linux (7.1, 8.0, and
8.1) In these installations a left click (the main
button click) will return a mouse event with a button
mask of BUTTON1_MASK + BUTTON3_MASK instead of simply
BUTTON1_MASK. This makes your popup window appear on
every mouse click instead of just right button click.
The solution (until this bug is fixed) is to see if
the int returned from the getModifiers() method on
mouse event == BUTTON1_MASK + BUTTON3_MASK and if it
does then DONT popup the window.
Oddly enough, I've had other people test this and they
tell me that the mouse events return the proper button
mask but every time I've tested it I get this bug.
Just a FYI. If you see that behavior then this is how
to fix it.

Similar Messages

  • How to load a UIView when a button clicked ? With a UIViewController ?

    Hi,
    I have a view controller which is loaded in a Window at the launch of the application. But I would like to load a UIView when I click on a button.
    I have the files below :
    - simpleAppDelegate.h
    - simpleAppDelegate.m
    - mainViewController.h
    - mainViewController.m
    How can I do with Xcode and IB ?
    Thank you a lot !
    Message was edited by: @pocalyps0

    If you want to display a second, full-screen view which has its own view controller I would recommend studying the Utility Application template (Xcode File->New Project...). This is a very instructive template and your time will be well spent even if your goal requires a different behavior.
    If you just want a smaller subview to appear on your main view, you can add a UIView in IB just as you would add a UILabel or UIButton, and change its hidden property in your code. If you'd rather not create the subview until it's needed and/or you want it to have it's own view controller, you may want to define it in a separate nib file and your study of the Utility template will probably help you see how to do this.

  • How to Show new Form when play button click?

    Hai all,
    i have 3 file. the first is quiz.as that contain two button. play and invite friend.quiz.fla. and quizapp.***. when i click play button i want to show the quiz that store in quizapp.as. int the quiz.as i have the mouse event that call quiapp.but when i run i got an error:
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
        at QuizApp/createButtons()
        at QuizApp()
        at Quiz/playQuiz()
    in createButtons(), i create three button next,prev and finish.
    whereas, in my quiz.fla library i have drag the button into my library but the error show nuul object reference for the button that i have created. can you help me to give some advice or sample code??

    Can you please elaborate more as the problem is not quite clear.
    However if you have the button instances placed on the stage already check if you have tick the "automatically declare stage instances" in your publish settings.
    Attach your code in a zip on this forum may be we can solve it then.
    P.S. :- Also you can access these buttons available in stage only in the document class.

  • How do I disable the brushes popup menu when I left click in Photoshop CS5?

    How do I disable the brushes popup menu when I left click in Photoshop CS5? I am trying to use the clone stamp and I am not able to get a sample because of this popup menu.

    LOL,  I can't even begin to complain with the number if times I misread questions, and then try to break my own record for the number of typos in a single post.
    The image above was taken on a photgraphic weekend where the group (of all young ladies ) I was travelling with, set us a photography challenge.  The one above was my response to a 'faceless portrait'.  The only other one I attempted was this response for a picture of a 'wild animal', featuring camera club president Liz.
    Oh what fun we had, laughing and laughing until our faces fell off.
    [EDIT]  Both taken at Karamea, which some visitors to NZ might recognise as the western end of the Heaphy Track.

  • I have just installed os7. How do I close apps when I double click on home button

    I have just installed os7. How do I close apps when I double click on home button

    Swipe to the app you want to close, press and hold the large image and swipe up and off the screen

  • Multiple flash files change when a button click using javascript function

    hi.. am new in flsh...
    i want to multiple flash files change when a button click using a javascript

    <script>
    var count=0;
    function mafunct(newSrc){
        alert("hi");
    var path="a"+count+".swf"; 
    flash+='<OBJECT CLASSID="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" CODEBASE="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" WIDTH="100%" HEIGHT="100%">';         
        flash+='<PARAM NAME=movie VALUE="'+path+'">';         
        flash+='<PARAM NAME="PLAY" VALUE="false">'; 
        flash+='<PARAM NAME="LOOP" VALUE="false">';
        flash+='<PARAM NAME="QUALITY" VALUE="high">';
        flash+='<PARAM NAME="SCALE" VALUE="SHOWALL">';
        flash+='<EMBED NAME="testmovie" SRC="Menu.swf" WIDTH="100%" HEIGHT="100%"PLAY="false" LOOP="false" QUALITY="high" SCALE="SHOWALL"swLiveConnect="true"PLUGINSPAGE="http://www.macromedia.com/go/flashplayer/">';
        flash+='</EMBED>';
        flash+='</OBJECT>';    
    count++;
    alert(path+"aa");
    </script>
    <button onclick="mafunct()">next</button>

  • Is it possible to have Flash open the menu when you right click a link?

    I'm using sIFR 3 on a few of my websites. Personally I think it's a really cool and nice solution. I have had no issues with it so far except what I've recently discovered.
    When you right click on a link (or control click on a mac) it should have the normal menu you'd get if you clicked on a regular HTML link. Also when you hover over the link it doesn't display the status in the status bar (i.e. the URL the link will take you to if you click it).
    Anyways, I'm trying to come up with a workaround to this (personally I think the developers should have already thought of one but I guess not). That being said I'm wondering if Flash can do something like that. Is there a code I can put in the Actionscript to tell it to open up the browser menu when someone right clicks or control clicks a link?
    For some reason I'm thinking this isn't possible without JavaScript but I have had some people telling me in the current version of Flash it isn't possible at all. I'd be interested in hearing everyone else's opinion.
    To see what I'm talking about check out this website I'm building here... http://dev.thinktecmediagroup.com/fibre-federal/
    Notice that the top navigation (and side navigation) is all done using sIFR. IF you try and right click (or control click on Mac) on one of the links you'll see nothing happens.

    Probleme solved without having to change anything in the flash.
    The solution was to add a small part in the CSS in HTML
    html {
    overflow-x: hidden;
    overflow-y: auto;
    Solve probleme. All browser. VERY usefull to know !

  • How to open a Filechooser on a button click from jsp page

    can anyone tell me how to open a Filechooser on a button click from a jsp page.
    Thanks

    <input type="file" name="myfile">

  • How to popup a page from a button not in a region position

    Hello.
    I am using Apex 2.2.1. I have a form (not a report) on which I've placed a button that is positioned "among the items" as opposed to being placed in a specific region position.
    When the button is clicked I would like to have another page popup. The problem is that I can get this to work only if the button is placed in a region position. With the button in a region position, I define the target to be a URL and then place a call to the popUp2 function, as in:
    javascript:popUp2('f?p=&APP_ID.:32:&SESSION.::NO:::', 900, 700);
    This works fine.
    However, I need to position my button on the immediate right hand side of a form item. But when I create a button in such a position, I have no field in which to place the call to the popUp2() function. Instead, I have to create a "Branch to Page or URL" and then place my javascript call in the Branch field. Unfortunately, when I click the button, Apex wants to branch to page zero instead of the desired page. I saw that when I move the mouse over the button, Apex shows:
    javascript: doSubmit('MY_BUTTON_REQUEST');
    And, as mentioned, Apex tries to branch to page zero.
    How does one call the popUp2() function from a button that is not placed in a region position?
    Thank you for your help.
    Elie

    Hi Elie,
    I had the same problem ... I only got it solved with creating a hidden item and adding the input-tag into the "Post Element Text" field.
    Just have a look in the source code of your page, how a button is build and copy the necesaary code to the mentioned field. So you get a button with ApEx layout and can add your javascript call.
    chrissy

  • How to popup a new forms window upon clicking Tools- Menu item

    Hi,
    I am new to forms. Can some one help me out with the following requirement?
    I need to provide a new 'Menu' item in the Tools menu of a seeded form and when the user clicks on the new menu option, he should get a new window wherein he can input some values. Then I need to read these user input values and pass them to a custom stored procedure and invoke the stored procedure on the database. After the stored proc finished executing I need to re-query the block on the seeded form to populate the latest records.
    Appreciate if some one can let me know the implementation steps for the requirement mentioned above.
    Thanks
    Sara
    Edited by: 4377318 on Sep 2, 2008 2:33 PM

    Hi OraMol,
    Thanks a ton for your response! Looks like it is pretty simple, but can you please brief me on how to create this 'canvas' to accept parameters and requery the base block? I know its a silly question though but basically am new to forms :)
    Sarah

  • Popup window when radio button clicked

    Hello,
    I have a button that has a URL redirect of:
    javascript:popUp2('f?p=&APP_ID.:8:&SESSION.::NO:::', 400, 400);
    This opens a separate window.
    Now I want this to happen when the user clicks on a radio button on that page.
    Thank you,
    Matt

    You dont have to put this in html head..
    ON THE PAGE RENDERING SECTION..
    UNDER ITEMS... FIND THE RADIO BUTTON ITEM AND CLICK ON THAT..
    U WILL SEE DIFFERENT TAB OVER THERE... LIKE .. SHOW ALL , NAME , DISPLAYED , LABEL , ELEMENT ... ETC..
    SELECT ELEMENT..
    UNDER ELEMENT YOU WILL SEE
    HTML FORM ELEMENTS ATTRIBUTES... IN THAT TEXT BOX U JUST HAVE TO COPY AND PASTE THE ABOVE CODE

  • How to add custom information, when Information button "I" is clicked

    Hi All,
    I have developed a custom collective search help, Now i need to display custom information to the all elementary search help's when  Information Button "i" is clicked.
    thanks in advance

    Hi,
    see the given link.
    custom control
    Regards,
    Shamma

  • New window everytime when submit button clicked in JSF

    Hi all,
    I am facing an issue where I need to popup a new window everytime the submit button on my JSF form is clicked.
    I have tried several methods but none is working to my purpose.
    1. Add a target="_blank" attribute in the JSF form. The problem is that even if any of my ValuechangeListeners get invoked, the page is rendered in a new window. My ValuechangeListeners work on onchange="submit()".
    2. Invoke a new window from javascript and name the window as say" new" . Also name the form's target as "new" but this does not generate a new window everytime and also problem 1 persists.
    3. If i use actionlistener and onclick event on button in the form, then the new page is rendered in both current page and new window.( javascript for new window is written).
    What I need is when a person clicks on submit button in the form, a new window should always popup up and the page should be rendered in the new window. The original form should remain as it is so that a user can again do a submit and get a new window.
    Please suggest.

    devayani wrote:
    Thanks all for the replies.
    Try onchange="this.form.target='_self';submit();"This works fine if all the valuechangelisteners are invoked. Suppose,if I dont select the radio
    button and dont select any values in list box. Now if i click submit, since the target=_blank,
    the page giving validation errors (for not selecting the list box)
    renders in a new page. As expected behavior, not my solution.
    If you need validation to remain in the same window (and that seems like the best for the user experience you have described), then delay the creation of the new window until after the request finishes. I.e., your page should always go back on itself. Under the right conditions (which you can set in your action method) it conditionally writes JavaScript which targets the new window.
    >
    Try returning false from the onclick event.I had tried it long back, so I just messed it up while writing, there were no actionlisteners.
    sorry about my third solution, lets consider solution 2 as below:
    Javascript
    <script type="text/javascript" >
         function newWindow(){
              window.open('','mywindow','width=400,height=200');
              return false;
         </script>
    JSF
    <h:form id="Frm_New" target="mywindow">     
    <h:commandButton id="btn_submit" disabled="false"             
                  action = "#{TestBean.submitValues}"
                  value="#{bundle.SC_SUBMIT}"
                  onclick ="newWindow()">But again this approach has above problems and also no new window everytime. For new window you said:
    Append a time stamp or random number to
    the end of the window name.This solution will not work as I have to reset the target for my form everytime to this new window name.You can remember the name of the window if necessary. Although you seem to be changing things on the fly; earlier the problem was you didn't get a new window every time. Or are you just confused on how to set the target?
    onclick="var wname = getWindowName(); createNewWindow(wname); this.form.target = wname; return true;">
    I was trying to actually set the target of the form as _blank at runtime during one of the phases of JSF lifecycle ( by using phaselistener). Although its not working as of now. Does this sound a good approach
    This is because I dont think that setting it on jsf would work as the page rendering on a new window( in my case) not only depends on clicking the submit button only but it depends on whether the user is done with all vaildations and now has to see the final result into new window.This would be addressed by the conditional JavaScript solution above.

  • Is it possible to add an item to the context menu when you control-click...

    an application? More specifically, when someone ctrl-clicks my application, I want an item to appear in the pop-up menu and if selected, to run an apple script. I was looking at folder automation and all and it seems like the area where I would look to do something like that. I have been looking for a while and can't seem to find it.
    I found something about making an action specific to just your app such as: MyApp.app/Contents/Library/Automator/MyAction.action. Maybe I am barking up the wrong tree. Can this be done? If so, how? So far I do not see how to add something to that menu.

    Ok, I found out that thing I am looking for is a CMM (Contextual menu modules), but so far I can only find references to ones made, not how to make one.

  • Tabs on Top option doesn't show up in the pop-up menu when I Control-click on an empty section of the Tab Strip in Firefox 15 on MacBook.

    I just updated my Firefox web browser to version 15.0 on my MacBook. I am really used to have Tabs under Address Bar. However, when I Control-click on an empty section of the Tab Strip, there is no "Tabs on Top" option in the pop-up menu.
    Any suggestion on how to find this option would be appreciated.

    That changed in Firefox 15 and is now a hidden preference; the default is for Tabs on Top to be on. To turn Tabs on Top off, you must use about:config. The instructions are the last item on the following page. I have also included a link on how to use about:config
    *http://www.addictivetips.com/web/firefox-15-new-features-changes/
    *http://kb.mozillazine.org/About:config

Maybe you are looking for

  • About my earlier post

    i tried to respond to it, unfortunately, because of this program, adobe flash player 11, i am unable to do so. i un-installed it and downloaded and re-installed version 10.3 and still i'm having the same problems. i am also unable to see what is in t

  • Display Problems With My Powermac G5

    I just got a used Powermac G5. It's the first-generation G5 machine, the Power Mac 7,2 model, which shipped with OSX 10.2 on it and the one I got had been sitting in a closet since the days of Jaguar and never upgraded. Way back when I had only one c

  • Problem with decreased font size in exported PDF.

    We have a web site running on a Windows 2008R2 server. The site was developed with Visual Studio 2010 using  .NET 4.0.and is running in 32bit. The associated application pool uses a specific local user. We have some reports that include a barcode fon

  • Commission report

    Hi Experts, Do you have any sample of commisson report in SD? Or, any FMs to get commisson? Thanks a lot. Yu

  • NAC Port Control Method : MAC or Linkup ?

    Hi, We are running OOB Virtual-GW and I'm wondering what control method you people are using ? MAC notification or Link-Up notification ? Our Cisco engineer told us to use MAC-Notif but I would like to have your thought about this ... Right now we ar