• 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 ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

Turn Rectangle Transparent Color

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to turn the rectangle on code line 102 transparent blue. Code starts after the ----- line. I am brand new to this so don't know much. Thanks!!!
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

 
Marshal
Posts: 64680
225
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Don't know, but that ain't Java®. It looks rather like ECMAScript (Javascript) so I shall try moving you where we usually discuss that.

And I have added code tags: always use them. Doesn't it look better now

And welcome to the Ranch
 
Marshal
Posts: 24594
55
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think it would help if you produced a much smaller example of code to ask about. You don't really need all of that code to produce a coloured rectangle, do you? Have a look at the SSCCE document (<== follow the link) for more about why.
 
Ranch Hand
Posts: 97
AngularJS Chrome Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you are calling a function addRect to set Rectangle property the addRect function set canvas fill style as cyan colour.you need to change parameter value to blue



try to change the function call parameter you can set transparent or blue

 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!