java - Best way for multilayered 2D Graphics on JFrame with partial repaint? -


basicly, want make game of chess.

the idea have picture of chessboard , individual chess pieces. work jpanel repaint everytime new positions of chess pieces, require positions of chess pieces , repaint board 33 pictures, double buffering , all.

a bit resource consuming think. afaik, there option repaint area, guess there're still better ways. imagine is, moving or removing 1 or 2 pictures or rather chess pieces each time rather repainting something.

i sadly have limited knowledge of classes out there , ask if there such way or entirely different one, job more efficient painting/repainting.

instead of inventing wheel again, use game engine sprite support jgame rendering.

also note today, resource consumption render chess small spending minute optimize minute wasted. should aim framework takes least time implement rendering of game don't have spend time on part of game.

if feel game engine overkill, how using table custom cell renderer draws each cell? table make sure updates rendered in optimal way. might able use custom tablemodel define playing field.


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -