Hello all.
I got a project which includes many classes.One of them is a class extending JPanel which is used to load an image as a background for my JFrame. Now,there are 2 other classes,instances of which are used to represent people interfering with each other or moving within the "environment".When at first steps of the project,i left out all the gui stuff. I just implemented the methods of the "people" classes and of course my main class.
But,in order to see if the whole thing would work since i had no gui at all ,i included a Point variable to the "moving" classes,so i printed messages when eg a class would reach a certain point. My question is:
1)What class should i use as a moving image on top of my background? bufferedImage?Or imageIcon?And why? I have very little gui experience...
2)Is there a gui class which could be possibly the easiest to use with the Point class,since i have already included it and it would make my life a LOT easier? :P
I'm not asking for ready code,i want to learn. Im just asking for some advice so i don't have to spend lot of time for the gui. Thanks in advance!

image in JPanel (good, don't change that) isn't BackGroung for your JFrame, just about terminology

add 1/ there are lots of discusions about BufferedImage how, when, which methods, search for that, basically is ImageIcon safiest options, because allows null Image and without error or exceptions to GUI, ho have to check just for null, if you want to or need, search for Moveable Components or moving Component, Moving (J)Frame, there are lots of implementations (MouseAdapter)

add2/ ??? no idea

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.