This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Resizable JPopupMenu" Watch "Resizable JPopupMenu" New topic

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.

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: 2152
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.
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: Resizable JPopupMenu
Similar Threads
How to create resizable swing components as in Netbeans Swings (GUI), drag and drop?
How to disable Maximize and minimize buttons on the popup??
Fixed Size
Jlist on Popupmenu