Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Adding resizable components to JPanel

 
Jesse Miller
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2612
9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Component Resizer might be what you are looking for.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic