PopupMenu in CollapsiblePane

This forum is used by users to request and discuss new product features. Please do not use this forum for technical support including bug reports.

Moderator: JIDE Support

Forum rules
Product suggestions only. Please do not use this forum for technical support including bug reports.

PopupMenu in CollapsiblePane

Postby kmadhy01 » Mon Apr 02, 2007 12:30 pm

Hi,

I was trying to add a JPopupMenu to the CollapsiblePane using the

pane.setComponentPopupMenu() method but nothing shows up. I am using JDK 1.5.

Would you have any suggestions/workarounds for this?

Thanks
kmadhy01
 
Posts: 7
Joined: Tue Jun 21, 2005 11:31 am

Postby JIDE Support » Mon Apr 02, 2007 1:23 pm

It seems working for me. I did this in CollapsiblePanesDemo and it works.

Code: Select all
    private static CollapsiblePane createOtherPlacesPane() {
        CollapsiblePane pane = new CollapsiblePane("Other Places");
        JidePopupMenu popup = new JidePopupMenu();
        popup.add(new JMenuItem("ABC"));
...

JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am

popup menu to collapsible pane

Postby kmadhy01 » Mon Apr 02, 2007 1:38 pm

Which method did you use to add the popup menu to the collapsible pane?
kmadhy01
 
Posts: 7
Joined: Tue Jun 21, 2005 11:31 am

Postby JIDE Support » Mon Apr 02, 2007 1:41 pm

setComponentPopupMenu. It is the next line that I forgot to copy.

Thanks,
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am

Postby kmadhy01 » Mon Apr 02, 2007 2:08 pm

Hi,

I must be missing something basic here...I tried the following code as you had suggested. When I right mouse on the collapsible pane ( and all over the frame) I do not see the popup.

Curious to know what you had done to see the popup ? ( just a basic right mouse click on the collapsiblePane?)

Let me know.

Thanks.

Code: Select all
public class JideTest extends JFrame {

    public static void main(String[] args){
        new JideTest();
    }

    public JideTest(){
        super("CollapsiblePane Test for Popups");
        CollapsiblePane pane = new CollapsiblePane("Other Places");
        JidePopupMenu popup = new JidePopupMenu();
        popup.add(new JMenuItem("ABC"));
        pane.setComponentPopupMenu(popup);
        getContentPane().add(pane);
        setPreferredSize(new Dimension(200,100));
        setVisible(true);
        pack();
    }
}
kmadhy01
 
Posts: 7
Joined: Tue Jun 21, 2005 11:31 am

Postby JIDE Support » Mon Apr 02, 2007 2:14 pm

I clicked on the empty space on the collapsible pane. If you right click on the buttons, it won't work unless you also call setInheritsPopupMenu(true) on those buttons.

Thanks,
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am

Postby kmadhy01 » Mon Apr 02, 2007 2:48 pm

Still doesnt work...

Which version of Jide are you testing this code with? We use 1.9.0...

Which space were you referring to in your earlier reply...I could not find any "space" besides the CollapsiblePane to click on...

Can you try running my testcode in your environment and let me know?

Thanks a lot!
kmadhy01
 
Posts: 7
Joined: Tue Jun 21, 2005 11:31 am

Postby JIDE Support » Mon Apr 02, 2007 2:49 pm

I don't think we have any code related to this so any JIDE version should work.

I click on the bottom left or right corner of the CollapsiblePane where there is no button.

Thanks,
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am


Return to Product Suggestions

Who is online

Users browsing this forum: No registered users and 6 guests