Thread: Help 3

    #1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2012
    Posts
    12
    Rep Power
    0

    Help 3


    in this class i added user to select the piece and then swap as well.

    here is my code:

    Code:
    import java.util.Scanner;
    
    /**
     *
     * @author usmanm2
     */
    public class Main {
        static Scanner input;
        /**
         * @param args the command line arguments
         */
        public static void main(String[] args) {
            input = new Scanner(System.in);
            // TODO code application logic here
            EdgeMatch em = new EdgeMatch(5, 5, 10);
            input.nextInt();
            EdgeMatchSolution ems = new EdgeMatchSolution(em);
            
            EdgeMatchDisplay emd = new EdgeMatchDisplay(ems, 400, 400);
            emd.setVisible(true);
        }
        public static void swap(EdgeMatchPiece ems)
        {
                    ems.swap(piece);
                    ems.repaint();
            }
        }
    the only problem is showing user can't select and swap.
    Last edited by usman2; December 26th, 2012 at 05:35 AM. Reason: wrap in code tags
  2. #2
  3. Contributing User
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Aug 2010
    Location
    Eastern Florida
    Posts
    3,714
    Rep Power
    348
    Please edit your post and wrap the code in code tags.
    Where is the CovUni package defined? The code can't be tested without it.
  4. #3
  5. Daniel Schildsky
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Mar 2004
    Location
    KL, Malaysia.
    Posts
    1,555
    Rep Power
    1621

    Use the same post please!


    You have started 3 different threads for your work. Are those work belong to the same task? If they are, could you PLEASE use the same thread to post your questions? Otherwise, if it takes 11 posts to solve your question, there would have 10 new threads started which are all referring to the same task. This is ridiculous.
    When the programming world turns decent, the real world will turn upside down.
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2012
    Posts
    12
    Rep Power
    0
    Each thread is belong to a different questions/tasks.
  8. #5
  9. Contributing User
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Aug 2010
    Location
    Eastern Florida
    Posts
    3,714
    Rep Power
    348
    Make one thread with all the parts for the question.

IMN logo majestic logo threadwatch logo seochat tools logo