JComboBox drop UP instead of DOWN --- AND --- FOCUS ISSUE
Joined: Jan 18, 2001
Hi everyone -- I'm hoping someone out there can help. We have an application that is ready to go into production, but the business owner is stopping that from happening until we find the answer to a couple of issues. We have an applet that interfaces with a PowerBuilder application. The applet appears inside the browser. At the bottom of the applet are two combo boxes, one on the bottom 'line' of the applet, the other directly above that one. Their issue is that when they expand either of the two JComboBoxes, the items in the list appear below the bottom of the browser and sometimes behind their task bar. I have set the max row count to 2, thinking that it would help some. However, they are DEMANDING that the JComboBox pop UP instead of DOWN when the triangle is clicked to expand the combo box. I don't see a way to do this in the API. Has anyone ever encountered this before? Any possible solutions?? Another issue that is stopping this from going into production is that the user bounces back and forth between this applet and the PowerBuilder application. The business owner wants the browser (the Java applet) to automatically bring focus to the PowerBuilder application and bring it to the front of the browser application in certain scenarios. I argue that it is a security issue that the applet in the browser CANNOT take control of another application on the user's PC: effectively, in my mind this is the same concept as the applet taking over the user's email application and spreading a virus. Am I correct that the applet cannot take control of PowerBuilder by bringing it to the front as the focused application? Is there any sort of workaround we could use instead? Currently, I pop up a message telling the user to switch to PowerBuilder. Any help on either of these two issues is GREATLY appreciated. THANK YOU!!!
Joined: Feb 01, 2001
I do not think you can change the way the JComboBox pops up, but as for the applet, you can sign the applet or have the user modify their security.property file to give the applet more control over their machine. However, working with PowerBuilder will make the applet OS specific. David
I've tried to duplicate a JComboBox (in an Applet, not JApplet) that extends below the NT Taskbar. The only way I can get that to happen is if the IE window is not maximized, but it simply close to the taskbar. If IE is not maximized, but the applet area is very near the bottom of the IE window, then the combobox does indeed extend below the IE window. But if IE is maximized, and the applet area is again, very near the bottom of the maximized IE window, then the combobox will expand upward. I've used the DrawTest.java demo included with the jdk to test this behaviour. Please try it out (jdk1.3/demo/applets/DrawTest.java) and tell me your results. p.s. just tested Netscape 4.7 - it has the same behaviour. [This message has been edited by Mike Curwen (edited March 27, 2001).]
subject: JComboBox drop UP instead of DOWN --- AND --- FOCUS ISSUE