Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to make Canvas transparent ?

 
Meir Yan
Ranch Hand
Posts: 599
  • 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: 11021
12
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • 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
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
im using swt
 
Esai ADIDRAVID
Greenhorn
Posts: 2
  • 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic