![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#41 |
|
Hobbyist Programmer
Join Date: Mar 2005
Location: Canada
Posts: 113
Rep Power: 4
![]() |
if (name.equalsIgnoreCase ("Karan Khak") == true)
{
c.clear ();
c.setTextColor (Color.black);
c.println ("Phantom Networks");
c.println ();
c.setTextColor (Color.orange);
c.print ("Name: ");
c.setTextColor (Color.white);
c.println (name);
c.setTextColor (Color.orange);
c.print ("Phone Number: ");
c.setTextColor (Color.white);
c.println (phone2);
c.setTextColor (Color.orange);
c.print ("E-mail: ");
c.setTextColor (Color.white);
c.println (email);
c.setTextColor (Color.orange);
c.print ("Address: ");
c.setTextColor (Color.white);
c.println (info3);
c.setTextColor (Color.orange);
c.print ("\t");
c.setTextColor (Color.white);
c.println (info4);
c.setTextColor (Color.orange);
c.print ("\t");
c.setTextColor (Color.white);
c.println (info5);
c.println ();
c.print ("Go Back? ");
back = c.readLine ();
}
}
if (search.equalsIgnoreCase ("Gender") == true)
{
c.print ("Please enter the person's gender: ");
gender = c.readString ();
}
}
while (back.equalsIgnoreCase ("yes"));
}
if (option.equalsIgnoreCase ("Turn Off") == true)
{
c.clear ();
c.setTextColor (Color.black);
c.println ("Phantom Networks");
c.println ();
c.setTextColor (Color.darkGray);
c.println ("Thank you for choosing our service.");
c.println ();
c.println ("\tPhantom Network Staff");
c.setTextColor (Color.blue);
c.print ("CLosing Access ");
c.setTextColor (Color.black);
c.print (".");
for (long a = 0 ; a < 70000000 ; a++)
;
c.print (".");
for (long b = 0 ; b < 70000000 ; b++)
;
c.print (".");
for (long d = 0 ; d < 70000000 ; d++)
;
c.print (".");
for (long e = 0 ; e < 70000000 ; e++)
;
c.print (".");
for (long f = 0 ; f < 70000000 ; f++)
;
c.setTextColor (Color.green);
c.println ("Shutdown was successful");
c.setTextColor (Color.darkGray);
c.println ();
c.println ("Please press any key when you are ready");
c.getChar ();
c.close ();
}
}
while (search.equalsIgnoreCase ("go back"));
}
while (back.equalsIgnoreCase ("Yes"));
}
}
}
while (option.equalsIgnoreCase ("log off"))
;
if (back.equalsIgnoreCase ("No") == true)
{
c.clear ();
c.println ("Phantom Networks");
c.println ();
c.println ("Thank you for choosing our service.");
c.getChar ();
c.close ();
}
}
public cell ()
{
Toolkit tk = Toolkit.getDefaultToolkit ();
Pic = tk.getImage ("Logo.jpg");
tk.prepareImage (Pic, -1, -1, this);
}
public boolean imageUpdate (Image img, int infoflags, int x, int y, int width, int height)
{
if (infoflags == 32)
c.drawImage (Pic, 105, 23, null);
return true;
}
} |
|
|
|
|
|
#42 |
|
Hobbyist Programmer
Join Date: Mar 2005
Location: Canada
Posts: 113
Rep Power: 4
![]() |
Since No one seems to be replying, i tried something myself. I changed the BefferedReader to BefferedWriter and and FileReader to FileWriter. Then, I don't know what to do. Here is my statement. Can someone tell me whats wrong here?
BufferedWriter save = new BufferedWriter (new FileWriter ("save.txt"));// this may be wrong but i need to be sure.
save.print (score);//a score. like what someone scores by answering questions or winning a game |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|