The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> Programming Languages
> Java Help
|
Help 3
Discuss Help 3 in the Java Help forum on Dev Shed. Help 3 Java Help forum discussing all Java platforms - J2ME, J2SE and J2EE - as well as relevant standards, APIs and frameworks such as Swing, Servlets, JSPs, Applets, Struts, Spring, Hibernate, ANT, EJB, and other Java-related topics.
|
|
 |
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

December 25th, 2012, 04:27 AM
|
|
Registered User
|
|
Join Date: Dec 2012
Posts: 12
Time spent in forums: 2 h 2 m 47 sec
Reputation 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
|

December 25th, 2012, 07:32 AM
|
 |
Contributing User
|
|
Join Date: Aug 2010
Location: Eastern Florida
|
|
|
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.
|

December 25th, 2012, 08:25 PM
|
 |
Daniel Schildsky
|
|
Join Date: Mar 2004
Location: KL, Malaysia.
|
|
|
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.
|

January 1st, 2013, 04:31 AM
|
|
Registered User
|
|
Join Date: Dec 2012
Posts: 12
Time spent in forums: 2 h 2 m 47 sec
Reputation Power: 0
|
|
|
Each thread is belong to a different questions/tasks.
|

January 1st, 2013, 07:33 AM
|
 |
Contributing User
|
|
Join Date: Aug 2010
Location: Eastern Florida
|
|
|
Make one thread with all the parts for the question.
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|