aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes Resizable JPopupMenu Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Resizable JPopupMenu" Watch "Resizable JPopupMenu" New topic
Author

Resizable JPopupMenu

Mahesh Kedari
Ranch Hand

Joined: Nov 28, 2009
Posts: 111
Hi all,
Need some help for creating a resizable JPopupMenu.
Just like any JFrame user should be able to drag JPopupMenu for resizing.


Regards,
Mahesh Kedari - Fidus Technologies Ltd.
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
might be easier to popup a small JDialog, with border only (no titlebar),
then add the same/similar functionality as that of a JPopupMenu
Mahesh Kedari
Ranch Hand

Joined: Nov 28, 2009
Posts: 111
Hi Michael,
Thanks alot for this solution. I've used this at one place but now i need to add a JPopup for hint of JTextField.
Problem with JDialog is, it opens new window on taskbar which i dont want. Is there any way to make the parent component of JPopup menu, resizable runtime?
Rob Camick
Ranch Hand

Joined: Jun 13, 2009
Posts: 2216
    
    7
On Windows a JDialog does not show up on the task bar. Maybe its different for other OS.

You can try using a JWindow instead of a JDialog.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Resizable JPopupMenu