aspose file tools
The moose likes Swing / AWT / SWT and the fly likes Adding resizable components to JPanel Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Reply Bookmark "Adding resizable components to JPanel" Watch "Adding resizable components to JPanel" New topic
Author

Adding resizable components to JPanel

Jesse Miller
Ranch Hand

Joined: Apr 05, 2010
Posts: 37
I have a bit of code that creates movable squares on a JPanel for the user to move as they like. I would like to add an option to allow for a re-sizable and movable rectangle to be added to the JPanel along with the squares. I found a bit of code at http://zetcode.com/tutorials/javaswingtutorial/resizablecomponent/ that allows you to create a re-sizable component. My question is, how would I add this to my JPanel. My code is below.
Rob Camick
Ranch Hand

Joined: Jun 13, 2009
Posts: 1787
    
    2
Component Resizer might be what you are looking for.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Adding resizable components to JPanel
 
Similar Threads
Moving multiple ojects in Java2D
Grid Alignment and Null Exception
How to move a second object?
Using custom panel in NetBeans GUI builder
JScrollPane update