java - getPopup() of PopupFactory not called on Mac -
i have extended javax.swing.popupfactory
class , override getpopup()
. have set shared instance popupfactory. have set logs in getpopup() method.
on windows can see logs of getpopup(). on mac logs not showing. seems on mac, getpopup()
method not called.
can help me why method not called on mac? how can override getpopup()
on mac?
here custom popupfactory , class in pack combo box in frame.
public class popupexample { public static void main(string args[]) { popupfactory.setsharedinstance(new popupfactory() { public popup getpopup(component owner, component contents, int x, int y) throws illegalargumentexception { system.out.println("getpopup called..."); homecoming super.getpopup(owner, contents, x, y); } }); jframe f = new jframe(); f.getcontentpane().add(new jcombobox(new string[]{"a","b","c"})); f.pack(); f.setvisible(true); } }
on windows can see message "getpopup called..." in console when click on combobox open. on mac didn't show message.
java osx swing jpopup
No comments:
Post a Comment