| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
Well, not the only way...an ugly expedient hack I've used a
couple times (where we have to support multiple look and
feels and, e.g., GTK's delegates are usually non-subclassable):
private boolean inSetUI = false;
public void setUI(nnnUI ui) {
inSetUI = true;
try {
super.setUI(ui);
} finally {
inSetUI = false;
}
}
public void addMouseListener (MouseListener ml) {
if (!inSetUI) {
super.addMouseListener(ml);
}
}
I'm not saying this is a great idea or something you should do
without knowing the consequences, but if the mouse behavior
for your component is well-defined *on all platforms*, it will
solve the problem.
| References: | |
| >Re: JTable/ListSelectionModel right-click issues (From: Tim Boudreau <email@hidden>) |
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.