Is there any way that if I set JPanel width and height (900x900) the image inside of JPanel will also be(900x900)
Actually I'm very new to Java Programming. I have made a game by Raw Java coding. And after finishing coding, the game works fine. But the Problem is, I have already set the Background of the Game by an Image size of (900x900) and some game components also set by an Image of Default sizes. Now the 900x900 JPanel Height and Width is perfect for me cuz my Monitor resolution is (1980x1080). So if anyone runs my game on other PC with Monitor resolution of (1366X768) my game will be out of the screen by Height. I could change my JPanel Height and Width but that doesn't change the Background Image or other Game component Image size.
So how can I solve this problem so that whenever I re-size the JFrame or set JPanel Height and Width different, my game component Images will be automatically be re-sized to appropriate size. Otherwise I have to make all new small sized game components and background Images and new Pixel movement modification.