Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

How can I open JOptionPane on the same monitor/desktop as the main window?

843806Jun 13 2008 — edited Jun 13 2008
I have an issue with multiple monitors:

My main app opens a pop up JOptionPane.showMessageDialog(). When the main windows is in the secondary monitor the pop up still comes up on the main monitor. This has annoyed a number of the users.

Is there any way the pop up will open in the same monitor/desktop as the main application windows (JFrame)?

Regards,
Chris

Comments

843844
To solve this problem I used <f:param> instead of actionParam:

On the drag support component:
<rich:dragSupport dragIndicator=":indicator" dragType="measure" dragValue="#{measure}">
                                                    <f:param name="operator" value="#{aggOp}" />
                                                    <rich:dndParam name="label" value="#{measure.name} (#{aggOp})"/>
</rich:dragSupport>
On the backing bean:
    //dropped item processors
    public void processDropSupportTable(DropEvent dropEvent) {
        if (dropEvent.getDragType().compareTo("measure") == 0) {
            SOLAPMeasure dragged = (SOLAPMeasure)dropEvent.getDragValue();
            FacesContext context = FacesContext.getCurrentInstance();  
            Map requestMap = context.getExternalContext().getRequestParameterMap();  
            String tempAggOp = (String)requestMap.get("operator"); 
            System.out.println("dropped: " + dragged.getId() + " named: " + dragged.getName() + " whose operator is: " + tempAggOp);
        }
    }
1 - 1
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jul 11 2008
Added on Jun 13 2008
4 comments
800 views