Hi all!
I have a some problem! I can't create chess interface in Java. Also, I can't programming some actions in java. /ex: when click A1 of chess board then moving process... etc/
Help me please my online friends!
Printable View
Hi all!
I have a some problem! I can't create chess interface in Java. Also, I can't programming some actions in java. /ex: when click A1 of chess board then moving process... etc/
Help me please my online friends!
Help for doing GUI programming with Java Swing: Swing Tutorial
General Java tutorial: Java Tutorials Really Big Index
I suggest that you go through the tutorials above, then break your project down into big goals, then these big goals into ever smaller steps. Then start trying to code each step. When you run into a specific problem with your code, please come on back and feel free to ask a question that is answerable within the confines of this forum.
Much luck!
I have written a chess program in java. You might start be creating a chessboard, which will probably be painted directly onto a JPanel. Then you will need to determine a formula which will determine whether each square will be light or dark. Then you will need a mouse listener for the board, And the event handler for mouse clicks will need to take the xy pixel co-ordinates for the mouse click and transform them into algebraic notation.
That's a good place to start. It is a long slow process.
Myself, I'd recommend that you start with the non-GUI model first since it will be what is ultimately directing the GUI. If you haven't heard about the MVC pattern, then Google this as it will explain in greater detail what I'm suggesting. I know that wikipedia has a write up on this.
Again, much luck.
In my opinion, you can download a free Java chess game and see how it is made.