I know that the title is ambiguous. I will explain.
So for game graphics, I know 2 ways to draw the whole thing.
- You may use JPanel, JLabel or other components to draw your UI even your in-game things.
- You may define your own class, own variable and override the paintComponent() method in you canvas class to draw your variables.
Game are of many types, action, strategy, shooting, chess, board game etc… Some game can purely use the 2nd way of drawing, but I don’t think all game fits (especially in board game, the position of many components are fixed).
So my question is, which is better in different type of games. Which is better for different part of the game (item bar, score label, menu). Then the advantages and the disadvantages of these 2.