Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

transperent window  RSS feed

 
basha khan
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi ranchers .. i m here again..
can i make a transperent window using swing?. i need a transperant window with some components visible.rest of my window area should show the desktop background..
welcome to all solutions and suggestions
can i make a curser like adobe acrobat viewer curser using swing?(a hand grabbing action while dragging the mouse).
basha
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can't really make a transparent window using just Swing... (well, you can try to fake it by taking a screenshot and painting on the background of your component, but it doesn't really work... if you move the window around, the background will not update fast enough...) You might want to take a look at SkinLF they support non-rectangular windows (which may have something to do with your questions.)

And yes, you can change cursors, so you could make a hand grab... make a graphic of the hand grab and the hand open, and use the Toolkit class to make your cursors.



Then you would swap these Cursors in a mouseListener:
 
basha khan
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks a lot nate.
"There are only five notes in the musical scale,but their variations are so many that they cannot all be heard.There are only five basic colours,but their variations are so many that they cannot all be seen"
appreciating ur work with swing which offer so many combinations.
basha
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!