• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Trying to Change the custom Color of a Rectangle made through DragMode and change type of Rectangle

Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello and good morning to all you kind sirs and madams

What I'm trying to do is basically draw a Rectangle outline through left-click and then dragging the mouse to the size one wants.

After one has created this rectangle, the user can change the color of the rectangle through clicking the 3 sliders found on the top in the program. Upon the change in color, the rectangle should change from "g.drawRect" to "g.fillRect" and use the desired color.

I have the basic outline of the program done, but need help with the last part (the color and changing of the Rectangle type after changing the color)

Thanks for the help in advance!
P.S. If possible, please use the same imported things that I use and try to keep it as simple as possible (Still learning Java)
P.P.S. Is there like a "then" command in Java? Like: after you've done x, do y. That would make this heaps easier. ;)

Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic