• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Drawing on desktopPane

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello everyone! This is my first time posting here at JavaRanch Big Moose Saloon, I hope I am doing it correctly.

I have a problem with my following code. I have created a background image witht the desktopPane and now I would like to draw some shapes over it, however I have no idea how to! Can someone please give me a few pointers and hints? Thank you very much for your help!

 
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


Rectangle2D.Double(1, 1, 2, 2)
this will draw a very small red square, but will be underneath the title bar

change to this and see if it appears
Rectangle2D.Double(10, 35, 2, 2)
 
Mabel Ahmad
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Oh whoops yes i changed the size now and it shows up in the cornner, however that is the only thing that shows up now and a white background. The background I had before is not showing up. Would anyone know why?

Thanks for your help!
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
just read your original post again, where you mention drawing shapes over the
image - this indicates you want the shapes on 'transparentPanel'.

if so, try this

reply
    Bookmark Topic Watch Topic
  • New Topic