answersLogoWhite

0

You would implement a MouseListener class like so:

public class MyMouseListener extends MouseAdapter {

public class MyMouseListener() {}

public void mouseClicked(MouseEvent e) {

if (e..getButton() MouseEvent.BUTTON3) {

; //the third button (right?)

}

}

}

Then you add in what you want to do when the correct button gets clicked. After that, you create a MyMouseListener object and register it as a MouseListener for whichever component you are trying detect events for (e.g. a pop-up menu for a JFrame).

User Avatar

Wiki User

∙ 18y ago
User Avatar

What else can I help you with?

Continue Learning about Engineering

What is syntax errors in java?

Runtime errors in Java means that there is some code error existing in your computer and it is impossible for you to deal with it by yourself unless you are the you're the applet's designer and change the code. Most of the time, runtime errors in Java will appear error message just like: "Java(TM) Plug-in Fatal Error Several Java Virtual Machines running in the same process caused an error." "Java(TM)Plug-in Fatal ERror the Java Runtime Environment cannot be loaded."


The programming language C is an enhanced version of the programming language C?

Yes, the C++ programming language is an enhanced version of the C programming language.Of note: to increment a variable by 1 in C, you could type myInt++ (i.e. for(int i = 0; i < 1; i++). C++ was named C++ because it is one step above C (C + 1).


How do you deal with installing Java Access Bridge?

So, I followed every instruction in oracle, yet when I try to install a program(which needs access bridge) it gives me this error: java.awt.AWTError: Assistive Technology not found: com.sun.java.accessibility.AccessBridge I did absolutely EVERYTHING in the oracle site about 5 times. Still won't work. Anyone can help?


What is the difference between C and java?

No. Java source code and C source code may look similar (since Java is based on C++, which is based on C), but the languages themselves are very different. Yeah both are totally different language based on different paradigm JAVA is Object-Oriented while C is procedural.C breaks down to functions while JAVA breaks down to Objects. C is more procedure-oriented while JAVA is data-oriented.C is a low-level language while JAVA is a high-level language.Java is an Interpreted language while C is a compiled language.


What is the big deal about green roof technology?

what is the big deal about gren roof technology

Related Questions

What is spot deal?

highlighht what you want pasted, right click and click 'copy', then go into word and right click then click 'paste'. Or if you want the whole screen, press the 'PrtScn' button on your keyboard, then go into word, right click, and click 'paste'. :)


What is Java and are updates needed?

Java is a programming language.In IT sector there is a demand of change always so to overcome and deal with the demand there is a need of updating of java.


How did the Nazis deal with the swing youth?

Sent them to a concentration camp and killed them


Where can I find a deal on swing sets in Seattle, WA?

Toys 'R Us and Home Depot are two stores which often feature sales on swing sets.


How do you beat level 20 on the impossible quiz deal or no deal?

spam click 'No seal'


Where can i find the best deal on wooden swing sets?

For the best deal, try searching eBay.com and Craigslist.com. If you don't mind a used swing set, you can usually find one for free or very cheap on Craiglist, but you usually must pick it up yourself. On eBay, you may find a cheaper deal, but keep in mind you must pay shipping, which can be hundreds of dollars.


Where can I find the best deal on a Little Tikes swing?

Hi there, if you go to a website called pricerunner.com it will give you the best price on any item and tell you where to buy from, including your little tikes swing! Good luck


How do you get kits on girlsensecom?

1.) Log in 2.) go to My Boutique and then click on My Studio 3.) A tab with all the fashions you can make will show up, on the right side will be a box called "Daily Deal" also known as a kit. They do cost gcents, but not many. 4.) Click on "Get it"


How do you deal with cyber bullying?

click on the 'report abuse' button if there one.


How to be a lmader at roblox?

This refers to users in the who post on the Let's Make a Deal forum on roblox.com; click Forum on your header, then click the second choice: Let's Make a Deal. You must have super-safe privacy disabled.


How do you deal with your horemones if your only 13?

First you need to except them. Because for me after I excepted them they really become fun. At least the mood swing part:D


Can you deal cards to your right in euchre?

No, in euchre, and in almost all card games, you deal to your left.