Results 1 to 3 of 3
- 10-25-2010, 05:12 AM #1
Member
- Join Date
- Oct 2010
- Posts
- 33
- Rep Power
- 0
Can somebody please help me with a "tie" scenario...URGENT
Can I put in a "tie" code here for if the pieces "tie", or is that not right? Also would it put a checkmark in the boxes that tied? If so I have been stuck with this problem and it's the last thing that I have to do. If anybody can help I would really appreciate it!
I need these 4 "tie" statements in the code:
"It's a tie between pieces 1,2 and 3";
"It's a tie between pieces 1 and 2";
"It's a tie between pieces 1 and 3";
"It's a tie between pieces 2 and 3";
Java Code:String winMsg = null; if (p1 > p2 && p1 > p3) { winMsg = "Piece 1 is the winner"; box1.setSelected(true); } else if (p2 > p1 && p2 > p3) { winMsg = "Piece 2 is the winner"; box2.setSelected(true); } else if (p3 > p1 && p3 > p2) { winMsg = "Piece 3 is the winner"; box3.setSelected(true); } result.setText(winMsg);
- 10-25-2010, 06:13 AM #2
Please lock this thread, cross post: Java help...Checkboxes
Sincerely, Joshua Green
Please REP if I help :)
-
Similar Threads
-
How to export JTable to CSV file "urgent help please"
By HAMADTO in forum AWT / SwingReplies: 8Last Post: 03-01-2011, 05:44 PM -
connection = DriverManager.getConnection(DATABASE_URL,'"+userid +"','"+password+"');
By renu in forum New To JavaReplies: 3Last Post: 10-12-2010, 04:21 PM -
report generation.. "URGENT"
By programmer_007 in forum JDBCReplies: 13Last Post: 10-17-2009, 08:25 PM -
MoneyOut.println("It took you (whats wrong?>",year,"<WW?) years to repay the loan")
By soc86 in forum New To JavaReplies: 2Last Post: 01-24-2009, 06:56 PM -
the dollar sign "$", prints like any other normal char in java like "a" or "*" ?
By lse123 in forum New To JavaReplies: 1Last Post: 10-20-2008, 07:35 AM


LinkBack URL
About LinkBacks


Bookmarks