Mouse events: how to know its button1 or 2 or 3?

writing a program that's driven by mouseReleased event. how do i determine that the user clicked the 1st mouse button n not the other mouse buttons? please help! thanx! :)

also, for double-click:
if(mouseEvent.getButton() == mouseEvent.BUTTON1){
if(mouseEvent.getClickCount() == 2) {                                                                                                                                                                                                                                                        

Similar Messages

  • How to know ITS Server URL??

    Dear all,
    I am trying to call ECC Transactions into IC Webclient, For that I have mapped logical system and need to give ITS Client number and URL in 'CRMS_IC_CROSS_SYS' transaction.
    I dont know from where we can get ITS client number and URL. We are using SAP WAS Server and the connection has already been established. As per reading over net, ITS is a inbuilt component of SAP WAS server.
    Can I use SAP WAS client number and host name for the URL CRMS_IC_CROSS_SYS transaction.
    Please guide me to complete this process successfully. Your suggestions will be highly appreciated.
    Thank you
    Raghu ram.

    Hi,
    Please refer to OSS Note 888931.
    Regards,
    Deepak

  • How to know its a iPhone 4 or 4s,pls!!

    I bought an iPhone on trademe but I don't how to check the iPhone ! So I don't know it's an iPhone 4 or 4s! Pls help me!! Thanks

    Unless Siri is turned off in the Settings. 

  • How can differ mouse event?

    In an mouse event, how can i find out whether right_button is clicked or not left_button?

    Try the following:
    if (e.getModifiers() == MouseEvent.BUTTON1_MASK) {
        System.out.println("Left mouse button was pressed");
    } else if (e.getButtonMask == MouseEvent.BUTTON3_MASK) {
        System.out.println("Right mouse button was pressed");
    }cheers,
    Greg

  • Origin of mouse events

    Hi, just new to the forum and I hope you can help me out with the following question.
    When a class (MyFrame) extends JFrame which has buttons on it, what class will tell JFrame that there was a click event on the button.
    As far as I know, when the MyFrame implements the actionlistener interface the method actionPerformed will be called. But who executes that function?
    The same goes for mouse events, how is MyFrame which implements a MouseListener interface, getting the function call to mouseClicked (for example).
    I hope I formulated the questions well, cause i'm not a native english speaker(writer).
    Please help me understand the origin of those calls.
    Thanks,
    Starik

    Okay, your MyFrame object doesn't have to implement MouseListener and in fact it's not usually a good idea. It could be any object!
    But if you have a MyFrame object that implements MouseListener and has all the appropriate methods, then to make the button notify it, you have to add the MyFrame as a MouseListener to the JButton.
    JButton b = new JButton("Hello");
    MyFrame frame = new MyFrame();
    b.addMouseListener(frame);

  • How to know my ipad is 4...y it shows only 13.6 gb in usage when i check in settings....my ipad is 16gb

    My Ipad has retina/wifi/cellular/16gb...but how to know its ipad4...because no were i see ipad4 (ipad box/website)...i agree it has lightning to usb but not mentioned on particulars...and also no 16gb is showed in usage when i checked in settings....how do come out of this ?

    If it has the Lightning port, it is an iPad 4. iPad 3rd gen and all below came with the 30-pin connector. If you want, post the model number and we will verify what it is exactly.
    Identify your iPad:
    http://support.apple.com/kb/HT5452

  • BB Z10 Gone completely black. No LED lights when connected to charger.HO​W TO KNOW ITS A HARDWARE OR SOFTWARE FAILURE?

    My bb Z10 just went completely blacked while i was using it this afternoon. It had above 70%charge while i was using it. i removed the battery and checked again a number of times. I even tried with another z10 battery properly working and found that its not a problem with my battery since the phone worked well with my battery in the other device.
    Since i bought the phone from another country and cant get the service here in India (the phone is still in the warranty period) I m confused what to do. 
    It would be really useful if I could figure out whether its software or hardware failure. If its a hardware prob, i should ship the device for warranty time benefits of service.But it it where a software prob, i could find out someway to solve this somehow here in India.
    HOW TO KNOW ITS A HARDWARE OR SOFTWARE FAILURE?

    try this,
    connect the device to BlackBerry link.by connecting it the conputer using USB cable(you can use your USB charger here)
    then while the device is still connected to the computer do not remove the USB but remove the battery.
    if BlackBerry link will be able to detect the device you can perform a back up(to keep the data of the device) then update the device. you need internet connection.
    this should fix the issue if the problem is with the software
    let me know what happens
    1. Please thank those who help you by clicking the "Like" button at the bottom of the post that helped you.
    2. If your issue has been solved, please resolve it by marking the post "Solution?" which solved it for you!

  • How to get the position of a selected cell in a table without using the mouse event?

    Dear All,
        I have a question about table:After clicking the cell of a table, the cell is into the edit status. How to know the row number and column number of the cell, when I click a button?
       The link below is using the mouse down event:
       http://forums.ni.com/ni/board/message?board.id=170&message.id=260102&query.id=55917#M260102
       Is there any other way to do it? Having tried to using the "edit position"  property, but it seems not working well.
       Thanks for any suggestion.
    Hugo 
    Attachments:
    table.vi ‏17 KB

    It works well with the "edit position" property.
    See attached
    Attachments:
    table.vi ‏12 KB

  • How to adjust mouse event with scaled DesktopPane

    Hi
    I am manjunatha, i am developing Data warehouse product, in this, i am showing inter-related Transforms in desktop pane, i given option to view the content of desktop pane with different scaled factor (ex 100%,50%,25%), when i will scale the content of desktop pane using Graphics class, only content will be scaled, but the events on the Internal frames will be referring 100% view only,(ie mouse event will not effected by scaled factor, so it will be point to 100% view points only, ex at first an Internal Frame will have bounds(10,10,200,200), after i will scale this to 10%, it will be drawn with (1,1,20,20) on the desktop pane, but internally its bounds will be (10,10,200,200) and mouse event will detect Internal Frame at (10,10,200,200) location , instead of scaled (1,1,20,20) location.
    My question is how can i scale the Internal Frames and adjust relevant events to it?
    (You can see screen shot of this page with (Mapplet View as screen name)
    At www.MyDataWarehousing.com)

    Did you ever find a solution to this? How did you scale all the components on resize?

  • How to limited mouse event in JPanel?

    I have a Jpanel with implements mouseListenert(mouseExited), how to limited the mouse event?
    this how to work:
    1. when my mouse exit ( move out) the jpanel, jpanel will disapprear and it's work
    2. in jpanel i add Jtextfield ( jpanel.add(Jtextfield) ). This is the problem, when my mouse over the jtextfield ( where jtextfield is in the jpanel ) my jpanel disapprear. It mean that when my mouse over jtextfield, my mouse exit from jpanel too.
    So how to limited mouse listener or what must i do?

    i don't know how to do that can you modify this sample code, that the child component do nothing when my mouse over it
    JTextField tf = new JTextField();
    JPanel panel = new JPanel();
    panel.addMouseListener(new MouseAdapter() {
             public void mouseExited(MouseEvent e) {
              panel.setInvisible(false);
    panel.add(tf);thx..

  • I have an old ipod that i have not used in a very long time, ive had it on a charger now for over an hour and i still cnnot get my ipod to turn on, how can i fix my problem, i just downloaded the new version of itunes aswell, so i know its not my itunes.

    i have an old ipod touch that i have not used in a very long time, and im having trouble gettign it to turn on. ive had it on a charger for over an hour now and still nothing hs changed. i just updated my itunes to the current version they haev so i know its not an itunes problem its rather a problem with the old ipod touch itself. im leaving for deployment soon and im trying to get this fixed without having to send it in. If anyone has any ideas on how to get this thing turned on it would be greatly appreciated.

    Well, two thoughts.
    The battery has completely discharged and will take overnight to recharge, so don't expect much in an hour.
    The battery has deep discharged and is now dead. It will never recharge and should be replaced.
    If your iPod Touch, iPhone, or iPad is Broken
    Apple does not fix iDevices. Instead they exchange yours for a refurbished or new replacement depending upon the age of your device and refurbished inventories. On rare occasions when there are no longer refurbished units for your older model, they may replace it with the next newer model.
    You may take your device to an Apple retailer for help or you may call Customer Service and arrange to send your device to Apple:
    Apple Store Customer Service at 1-800-676-2775 or visit online Help for more information.
    To contact product and tech support: Contacting Apple for support and service - this includes international calling numbers.
    iPod Service Support and Costs
    iPhone Service Support and Costs
    iPad Service Support and Costs
    There are third-party firms that do repairs on iDevices, and there are places where you can order parts to DIY if you feel up to the task. Start with Google to search for these.
    The flat fee for a battery exchange is, I believe, $99.00 USD.

  • As a new MacBook user I plug in my USB Flash Drive but don't know how to access its contents. Please help. Thanks.

    as a new MacBook user, when inserting my USB Flash Drive, I do not know how to access its contents. Please help. Thanks.

    Open a new Finder window, Finder > File > New Finder Window, and it should appear on the left under Devices.
    If you don't see it there, or to get it to show up on the Desktop: Finder > Preferences... General tab, check External disks to have it show on the Desktop,  Or Sidebar tab, check External disks under DEVICES.

  • How to search ebooks in iTunes if I only know ISBN of one book? How could I know its iTunes book'ID from the isbn?

    Dear community members,
    I'm new here. I have a question about searching ebooks in itunes search API.
    If I know ISBN of one book, either 10-digit ISBN or 13-digit ISBN, how could I know its ebook ID in itunes store?
    In other words, is there any rule that I could convert regular ISBNs to ebook IDs? Or where I could find the reference?
    Thank you.

    Try searching Amazon or Barnes & Noble or your local library, if they have an online search, for the ISBN. That will give you the title of the book so you can then search the iBooks store. Or just buy the book from Amazon or B&N as a Kindle or Nook book; both have viewers for Windows and Mac as well as iOS devices.
    Regards.

  • FCPX: In Event Library: how to know if a video was used in the timeline of Final Cut Pro X?

    In Event Library: how to know if a video was used in the timeline of Final Cut Pro X?
    An example: In Premiere Pro, the whole video is added to the timeline identified as used in their video library. Facilitating our work on a big project, not to repeat videos. You can do this in FCPX?

    The way it works in FCP:
    Working from the Timeline Index, you can see lists of all clips in the sequence and their location in the timeline.
    You can also do a search (kevn) to narrow the results.
    Russ
    hth.
    Russ

  • How to catch the mouse event from the JTable cell of  the DefaultCellEditor

    Hi, my problem is:
    I have a JTable with the cells of DefaultCellEditor(JComboBox) and added the mouse listener to JTable. I can catch the mouse event from any editor cell when this cell didn't be focused. However, when I click the editor to select one JComboBox element, all the mouse events were intercepted by the editor.
    So, how can I catch the mouse event in this case? In other word, even if I do the operation over the editor, I also need to catch the cursor position.
    Any idea will be highly appreciated!
    Thanks in advance!

    Hi, bbritta,
    Thanks very much for your help. Really, your code could run well, but my case is to catch the JComboBox event. So, when I change the JTextField as JComboBox, it still fail to catch the event. The following is my code. Could you give me any other suggestion?
    Also, any one has a good idea for my problem? I look forward to the right solution to this problem.
    Thanks.
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class Test3
    extends JFrame {
    // JTextField jtf = new JTextField();
    Object[] as = {"aa","bb","cc","dd"};
    JComboBox box = new JComboBox(as);
    public Test3() {
    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    Container content = getContentPane();
    String[] head = {
    "One", "Two", "Three"};
    String[][] data = {
    "R1-C1", "R1-C2", "R1-C3"}
    "R2-C1", "R2-C2", "R2-C3"}
    JTable jt = new JTable(data, head);
    box.addMouseListener(new MouseAdapter() {
    // jtf.addMouseListener(new MouseAdapter() {
    public void mouseClicked(MouseEvent e)
    System.out.println("-------------------JComboBox mouseclick....");
    jt.addMouseListener(new MouseAdapter() {
    public void mouseClicked(MouseEvent e)
    System.out.println("-------------------JTable mouseclick....");
    // jt.setDefaultEditor(Object.class, new DefaultCellEditor(jtf));
    jt.setDefaultEditor(Object.class, new DefaultCellEditor(box));
    content.add(new JScrollPane(jt), BorderLayout.CENTER);
    setSize(300, 300);
    public static void main(String[] args) {
    new Test3().setVisible(true);
    }

Maybe you are looking for

  • "ipod cannot update - file not found" after getting new ipod

    i had my ipod replaced today at the apple store because of a bad HD. Seems like the one they gave me was brand new...anyway after following the restore/charge directions, i went to go plug it into my dock and Itunes is telling me it can't update the

  • Delegating Calendar Invites to iCloud

    I have an iCloud account, but it is not the email address I declare to the outside world.  I also have a Fastmail email, but again I don't declare this email address to the outside world.  They are for function only.  The email address that I do send

  • How to front-end Oracle Application Server 10g with Apache 2.0

    Hello, I have a seperate apache tier from my oracle app tier and I want to use my compiled apache as a web front-end for oracle apps. I have a completely default configuration at the moment. The only documentation I have been able to find on Oracle's

  • AR Correspondence - Linking Form ID to Correspondence type

    Hi SAP Gurus, Can anyone let me know how to link a Form ID to a correpondence type in Accounts Receivable. Is it through report variant? This is what I have done so far, Under SPRO>Accounts Receivable and Accounts Payable>Customer Accounts>Line Items

  • How to lock MM in Inventory

    Hi, I want to lock any materialmovements in MM because inventory. I know lock Tcodes, users and lock periods in FI and CO. I there another sinple way to do this? Thanks for answer. Regards, Dieter I post this Question also in ABAP-Forum  because i'm