• 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
  • Paul Clapham
  • Bear Bibeault
  • Liutauras Vilda
  • Devaka Cooray
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • Henry Wong
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • salvin francis
  • Frits Walraven
  • Piet Souris

Java programming - drawings

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could someone help me please with Java programming? I need to create a drawing. I have an example, but I can't add file here. If someone could, please, write your e-mail and I will send what I need. Thanks a lot and have a nice weekends!
 
Ranch Hand
Posts: 116
11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you going to use JavaFX or Swing? What have you tried so far?

You can add a control to your project that is capable of displaying images (for example, ImageView in javafx) and then a method on it to set its image to the image you want displayed. Or you can override the paint method of a component that is capable of painting, retrieve the Graphics object, and then use the drawImage method to draw your image onto it.

You can post source code here with the code tags if you have some to show.
 
Sheriff
Posts: 6801
182
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch, Diana Lee!

If someone could, please, write your e-mail and I will send what I need.  



That's not the way we do things around here, I'm afraid.  We are NotACodeMill (that's a link).  Post your requirements here and what you've done on your own, and you will get some helpful feedback.  And remember to UseCodeTags (that's also a link).
 
New rule: no elephants at the chess tournament. Tiny ads are still okay.
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!