This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to make Canvas transparent ?

 
Meir Yan
Ranch Hand
Posts: 599
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all, sorry for the double posting but its different subject .
i have Canvas and i like to make its background transparent , but with no luck
the canvas is create on canvas parent .
can it be done with canvas ? or i need to use other control ?
 
Maneesh Godbole
Saloon Keeper
Posts: 10971
11
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use JPanel instead of Canvas.
Canvas is a heavy weight AWT component where as JPanel is a light weight Swing component and both of them serve the same purpose.
To make the it transperant call
 
Meir Yan
Ranch Hand
Posts: 599
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
im using swt
 
Esai ADIDRAVID
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I was too facing the same problem. But anyway, the alternate approach may be to follow a different path.

Follow the hyper link. You should get the solution.
OnJava)

You use the AWT Canvas in SWT Application.

Regards,
Esai
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic