Click here to Skip to main content
15,892,674 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello coders, I have a project in my class, I have to build a game base on Monopoly game. Here is my Question, I knew that I can draw in Java to get the board game and the other object in the game, but can I insert a picture instead of drawing? Is it any code that helps me to insert a picture in Java? When a picture insert into a class, can I use it to place the tokens on or show the information of the property when a token move to that property on the picture? Thank btw

What I have tried:

I write something to fulfil the requirement of "What have you tried?".
Posted
Updated 21-Oct-18 19:36pm

1 solution

As I can understand that you are looking to draw a picture from a saved bitmap (you are calling it as insert?) and not by drawing line, circle and other shapes? If it is correct, there are support in JAVA for it, please refer Drawing an Image (The Java™ Tutorials > 2D Graphics > Working with Images)[^]

Also try to google on how to draw a bitmap.
 
Share this answer
 
Comments
Member 14025358 22-Oct-18 1:56am    
Thanks, I get it.
CPallini 22-Oct-18 7:21am    
5.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900