Results 1 to 7 of 7
  1. #1
    ganzorig is offline Member
    Join Date
    Nov 2009
    Posts
    1
    Rep Power
    0

    Smile I want play chess in Java

    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!

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    25

    Default

    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!

  3. #3
    fgm1 is offline Member
    Join Date
    Nov 2009
    Posts
    23
    Rep Power
    0

    Default

    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.

  4. #4
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    25

    Default

    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.

  5. #5
    fgm1 is offline Member
    Join Date
    Nov 2009
    Posts
    23
    Rep Power
    0

    Default

    Quote Originally Posted by Fubarable View Post
    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.
    I wouldn't, there's more to it than that. It's not the way I developed mine, but there always more than one way to get the job done.

  6. #6
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    25

    Default

    Quote Originally Posted by fgm1 View Post
    ...but there always more than one way to get the job done.
    Amen to that.

  7. #7
    raqman is offline Member
    Join Date
    Sep 2009
    Posts
    37
    Rep Power
    0

    Default

    In my opinion, you can download a free Java chess game and see how it is made.
    RAQ Report: free Java reporting tool.

Similar Threads

  1. How to play movie using java
    By sithara in forum New To Java
    Replies: 3
    Last Post: 02-20-2013, 12:29 PM
  2. a good java chess program
    By rico16135 in forum New To Java
    Replies: 10
    Last Post: 11-06-2010, 12:25 PM
  3. New Chess-Like game
    By jSarK0Y in forum Reviews / Advertising
    Replies: 3
    Last Post: 06-10-2009, 03:28 AM
  4. how can I play an mp3 file in java?
    By iliana in forum Networking
    Replies: 1
    Last Post: 05-30-2008, 07:32 PM
  5. how to play MIDI in java application?
    By oregon in forum Advanced Java
    Replies: 1
    Last Post: 08-07-2007, 02:26 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •