Pleas can someone help me
i have problem with my program i implement saveing method
but when i open file( game.txt) it does not update my board it return same postion every time i same game
chess class Jframe(Jfilechooser)(call an board array)---->
Gui Japplet class( call and board array------------>
Board(class Jpanel have board array)
it does not update borad array
it just call it once in start and return the same value every time
classChess(){
ChessPlayer java = new ChessPlayer();
public void saveData()
File file = null;
JFileChooser fc = new JFileChooser();
fc.setCurrentDirectory(new File("."));
fc.setDialogTitle("Save Text As...");
int returnVal = fc.showSaveDialog(this);
if (returnVal == JFileChooser.APPROVE_OPTION)
{ file = fc.getSelectedFile();
try
{ PrintWriter out =
new PrintWriter(
new BufferedWriter(
new FileWriter(file)));
//while for all the moves in the array>
for (int i=0;i<120;i++)
out.println( java.saveDAta(i));
out.println("\n");
out.close();
catch (IOException e) {
// Some error has occured while trying to read the file.
// Show an error message.
JOptionPane.showMessageDialog(this,
"Sorry, some error occurred:\n" + e.getMessage());}
public static void main(String[] args) {
JPopupMenu.setDefaultLightWeightPopupEnabled(false);
JFrame frame = new ChessMan();
Container content = frame.getContentPane();
ChessMan f = new ChessMan();
//japplet
ChessPlayer javaAppletication = new ChessPlayer();
javaAppletication.init();
javaAppletication.start();
}Gui
class Gui{
int [] board = new int [120];
int [] boardcolor = new int [120];
Board check = new Board(this,false);
{public void init()
{ // Create new Border
contentPane = getContentPane();
bboard = new Board(this,false);
public String saveDAta(int i)
String l=check. save(i);
return (l);
}and finally board Jpanel
class Board extends JPanel
{public Board (JApplet useapplet,boolean bool) {
setup();
{ public String save(int i)
{ String l;
if (color==1)
{System.out.println("notpossible");}
l = board[i]+"$"+boardColor;
return l;
thanks guys
With some basic print-outs (System.out.println(...)) of what you ACTUALLY read and write and what values are in your board etc, you should see what goes wrong.
Gil
Similar Messages
-
When i switch my Muvo N200 to Music mode, all the track sound become scratchy. But when i switch to FM mode, the sound is OK.
Can someone help or assist me in this matter. Thanks guys!Reload the firmware - get the same version as you already have from the link in my signature line.
PB -
I can not send email from my iPhone 3g using me dot com. Can someone help?
I have had my iPhone 3g for 2 weeks now I believe and in this time have received tons of e mails but when I try to reply or send a new e mail I get the message "The connection to the outgoing server "smtp.mac.com" failed."
I don't see why since my wifi is connected and does everything else, like surf the web, download updates to apps and receive e mail.
Can someone help me figure this out? I also just purchased an iPod touch which will be using wifi only so I'm scared that it too will have the same problemI have a 1st gen iPhone that I just updated the software to 2.0.2
Now whenever I press the mail icon it goes to the mail app for about 4 seconds, does nothing, no loading of folders, old messages, nothing.
Then it reverts back to the home screen. Tried restarting, haven't tried restoring, thought I'd look here first.
Anyone??? -
When I try to send email from my iPad and iPhone it says that I have the wrong username and/or password, but I know they are correct. Can someone help me?
"Your email account" means to tap on the name of your email account. Whatever it is listed as in the settings.
In my mail settings, one of my email accounts is a Comcast account. I tap on the Comcast name and it brings up this window.
Then I tap on the arrow under the Outgoing mail server smtp setting to get to the next window.
In the resulting window, I then tap on the arrow next to the smtp server under the Primary Server setting.
That brings up this window in which I check to make sure that my user name and password have been entered correctly. If those items are missing, enter them in the appropriate fields and then tap done. -
my ipod touch 1st gen has gone into recovery and wont restore because of a error 1 or something like that can someone help me quick this ipod is my little cousins and i dont want her mum to find out what happend
I have not seen a solution for error (1)
make an appointment at the Genius Bar of an Apple store since it appears you have a hardware problem.
Apple Retail Store - Genius Bar -
Hello can someone help me I have an iphone 4 and my daughter has an ipod touch we are on the same email address but somehow with in the last 25hrs all of my contacts are gone and only hers on on my phone is there a way for me to get all my contacts back?
If you need assistance with finding any of your restores or attempting to restore from any that happened prior to his incident follow this article
http://support.apple.com/kb/ht1766
IF you do find a backup that has your contacts; I'd /highly/ recommand turning off your wifi network after the restore is finished because if the issue is with your iCloud your contacts may merge back with her's.
With iCloud you DO NOT want to share the account; bad things happen Evil evil thigns...
But in all seriousness; if two devices have the same iCloud; iCloud is told to merge and sync infomation between hte two and can't tell that it doesn't belong to the same person -
Some of my photos in Iphoto turn blank (white) when I tried to edit the size like zoon in and out.Can someone help me on this?
As a Test:
Hold down the option (or alt) key and launch iPhoto. From the resulting menu select 'Create Library'
Import a few pics into this new, blank library. Is the Problem repeated there? -
HT5429 direction is not coming in IOS 6 in india. can someone help me for the same?
direction is not coming in IOS 6 in india. can someone help me for the same? i'm using iphone 4
Hi Civilclerk1,
In order to achieve your requirement, we can try to use the following expression to instead the last_name column and first_name field:
last_name: =iif(Fields! staff_role.Value="Lead Atty" or Fields! staff_role.Value="BK Mgr" or Fields! staff_role.Value="Partner" ,Fields! last_name.Value,nothing)
first_name: =iif(Fields! staff_role.Value="Lead Atty" or Fields! staff_role.Value="BK Mgr" or Fields! staff_role.Value="Partner" ,Fields! first_name.Value,nothing)
Besides, if we don’t want see the blank row in the tablix, we can add a filter as below in the tablix:
Expression:=iif(Fields! staff_role.Value="Lead Atty" or Fields! staff_role.Value="BK Mgr" or Fields! staff_role.Value="Partner" ,1,0)
Operator:=
Value:=1
If there are any misunderstanding, please elaborate the issue for further investigation.
Thanks,
Katherine Xiong
Katherine Xiong
TechNet Community Support -
I have an early 2011 MacBook Pro which has been running slow for a while. After looking at responses to similar problems I have downloaded and run EtreCheck. Please can someone help me with what it all means.
Thanks in advance.
EtreCheck version: 1.9.15 (52)
Report generated 19 September 2014 08:07:14 GMT+8
Hardware Information: ?
MacBook Pro (13-inch, Early 2011) (Verified)
MacBook Pro - model: MacBookPro8,1
1 2.3 GHz Intel Core i5 CPU: 2 cores
4 GB RAM
Video Information: ?
Intel HD Graphics 3000 - VRAM: 384 MB
Color LCD 1280 x 800
System Software: ?
OS X 10.9.4 (13E28) - Uptime: 0 days 0:4:29
Disk Information: ?
Hitachi HTS545032B9A302 disk0 : (320.07 GB)
S.M.A.R.T. Status: Verified
EFI (disk0s1) <not mounted>: 209.7 MB
Macintosh HD (disk0s2) / [Startup]: 319.21 GB (147 GB free)
Recovery HD (disk0s3) <not mounted>: 650 MB
MATSHITADVD-R UJ-898
USB Information: ?
Apple Inc. FaceTime HD Camera (Built-in)
Apple Inc. BRCM2070 Hub
Apple Inc. Bluetooth USB Host Controller
Apple Inc. Apple Internal Keyboard / Trackpad
Apple Computer, Inc. IR Receiver
Thunderbolt Information: ?
Apple Inc. thunderbolt_bus
Gatekeeper: ?
Mac App Store and identified developers
Kernel Extensions: ?
[not loaded] com.seagate.driver.PowSecDriverCore (5.2.4 - SDK 10.4) Support
[not loaded] com.seagate.driver.PowSecLeafDriver_10_4 (5.2.4 - SDK 10.4) Support
[not loaded] com.seagate.driver.PowSecLeafDriver_10_5 (5.2.4 - SDK 10.5) Support
[not loaded] com.seagate.driver.SeagateDriveIcons (5.2.4 - SDK 10.4) Support
[loaded] com.sophos.kext.sav (9.1.55 - SDK 10.7) Support
[loaded] com.sophos.nke.swi (9.1.50 - SDK 10.8) Support
Launch Daemons: ?
[loaded] com.adobe.fpsaud.plist Support
[loaded] com.microsoft.office.licensing.helper.plist Support
[running] com.sophos.autoupdate.plist Support
[running] com.sophos.configuration.plist Support
[running] com.sophos.intercheck.plist Support
[running] com.sophos.notification.plist Support
[running] com.sophos.scan.plist Support
[running] com.sophos.sxld.plist Support
[running] com.sophos.webd.plist Support
[running] com.trusteer.rooks.rooksd.plist Support
Launch Agents: ?
[loaded] com.divx.dms.agent.plist Support
[loaded] com.divx.update.agent.plist Support
[running] com.sophos.uiserver.plist Support
[running] com.trusteer.rapport.rapportd.plist Support
User Launch Agents: ?
[loaded] com.adobe.ARM.[...].plist Support
[running] com.amazon.music.plist Support
[loaded] com.google.keystone.agent.plist Support
[not loaded] jp.co.canon.Inkjet_Extended_Survey_Agent.plist Support
User Login Items: ?
iTunesHelper
TomTomHOMERunner
AdobeResourceSynchronizer
Dropbox
Internet Plug-ins: ?
FlashPlayer-10.6: Version: 15.0.0.152 - SDK 10.6 Support
DivX Web Player: Version: 3.2.1.977 - SDK 10.6 Support
AdobePDFViewerNPAPI: Version: 11.0.09 - SDK 10.6 Support
AdobePDFViewer: Version: 11.0.09 - SDK 10.6 Support
Flash Player: Version: 15.0.0.152 - SDK 10.6 Support
EPPEX Plugin: Version: 10.0 Support
Default Browser: Version: 537 - SDK 10.9
OVSHelper: Version: 1.1 Support
QuickTime Plugin: Version: 7.7.3
SharePointBrowserPlugin: Version: 14.4.4 - SDK 10.6 Support
iPhotoPhotocast: Version: 7.0 - SDK 10.7
Safari Extensions: ?
Ultimate
Audio Plug-ins: ?
BluetoothAudioPlugIn: Version: 1.0 - SDK 10.9
AirPlay: Version: 2.0 - SDK 10.9
AppleAVBAudio: Version: 203.2 - SDK 10.9
iSightAudio: Version: 7.7.3 - SDK 10.9
iTunes Plug-ins: ?
Quartz Composer Visualizer: Version: 1.4 - SDK 10.9
3rd Party Preference Panes: ?
Flash Player Support
Perian Support
Trusteer Endpoint Protection Support
Time Machine: ?
Skip System Files: NO
Auto backup: YES
Volumes being backed up:
Macintosh HD: Disk size: 297.29 GB Disk used: 160.38 GB
Destinations:
Data [Network] (Last used)
Total size: 2 TB
Total number of backups: 99
Oldest backup: 2012-04-20 17:05:32 +0000
Last backup: 2014-09-18 23:49:25 +0000
Size of backup disk: Excellent
Backup size 2 TB > (Disk size 297.29 GB X 3)
Time Machine details may not be accurate.
All volumes being backed up may not be listed.
Top Processes by CPU: ?
6% InterCheck
5% iCalExternalSync
3% WindowServer
2% CalendarAgent
2% SystemUIServer
Top Processes by Memory: ?
152 MB SophosScanD
147 MB InterCheck
106 MB SophosAntiVirus
66 MB Dropbox
57 MB com.apple.iTunesLibraryService
Virtual Memory Information: ?
161 MB Free RAM
1.55 GB Active RAM
1.41 GB Inactive RAM
902 MB Wired RAM
611 MB Page-ins
0 B Page-outsUninstall Trusteer software
http://www.trusteer.com/support/uninstalling-rapport-mac-os-x
Remove Sophos
https://discussions.apple.com/message/21069437#21069437 -
So I download photoshop cc (2014) and when I go to open the program, it gives me an error message and shuts the program down. It says," A problem cause the program to stop working correctly. Windows will close the program." Can someone help me please?
I've got the same issue and it affects all my adobe software. You are not alone as I have seen several postings looking for the answer to this help request.
-
please can someone help me to unistall itunes from my laptop control panel, this means it also wont let me install the latest version!
I also have Jolly's problem. I found the iMovie 9.0.9 folder and tried to launch the older version of iMove. It would not launch. I removed all of the iMovie preferences from the Preferences folder, removed iMove 10 from the applications folder, and restarted my Mac. iMove 9.0.9 still won't launch and I can't access my videos created with the older version of iMovie. Is there a way to uninstall iMovie 10 and reinstall iMovie 9.0.9?
I am running Yosemitie on a iMac.
Paul -
I cannot open itunes. When I try, a popup says I need quicktime 7.5.5 but I cannot download it. Can someone help??
Quicktime 7.5.5 can be downloaded from this link.
http://support.apple.com/downloads/#quicktime -
I cant install or uninstall my itunes. I get this error 'the feature you are trying to use is on a network resource that is unavilable' Now ive seen the solutions on here but im using windows 8.1 and none of them work for me. Ive tried all options so please can someone help?
That doesnt work for me. I removed itunes through the windows cleaner method as shown in other posts and re-installed itunes. Now im getting this error
iTunes was not installed correctly. Please reinstall iTunes
Error 7 (Windows error 126)
Also my Microsoft office has stopped working after i deleted Itunes which is really strange.
Can somebody provide me a solution please.... -
I am trying to print a PDF file to a legal size paper and I would like for it to fill up the page. How do I do this? I went into the settings and changed it from letter to legal, but it's still printing out the same size. Can someone help me, please?
Are you trying to Print to PDF or are you trying to Print a PDF file to a physical printer?
-
I'm trying to open an iTunes account and was asked to provide one of each:credit card details or gift card details.i provided a gift card details and yet I'm being asked to contact the support team!!! Pls can someone help me out on this as I cant enjoy my new iPad 3 without buying apps
Brenda, the easiest way to contact the support team is thru the iTunes Customer Service website:
http://www.apple.com/support/itunes/contact/
Maybe you are looking for
-
I would like to be able to watch my rental movie/tv shows from Itunes on my tv... I understand that I cannot put it on a USB stick, but is there any other option available? I've tried USB to USB cable and am having no luck.
-
File Transfer non-unicode - unicode via client
Hello. I downloaded a binary file from a SAP 4.0 system to my client (win2k) with OPEN DATASET (to read the file on the app server) and WS_DOWNLOAD (to save it to the client). Now i want to upload this file from my client to a 6.40 unicode system. Th
-
hi, my ipad 2 went black, when i using safari..but it has back light on. i tried reboot with home and sleep key, and it didn't work. still black without white apple logo!! help!!
-
Yosemite - dual monitor; full screen option
I have a Mac Mini running the latest version of Yosemite. I have two monitors. Because I want to use Spaces, I do not have separate desktops on each monitor. My problem comes in when I click on a window "expand" button. When I do this the window expa
-
Passing user input data to existing pdf
My customer prints business cards, currently the printing requests are submitted by a variety of methods (e-mail,paper napkins, etc.) that create more work and consume to much time. When a request is finalized it is in pdf format and at that point re