Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old May 17th, 2005, 7:35 AM   #41
Dark Flare Knight
Hobbyist Programmer
 
Join Date: Mar 2005
Location: Canada
Posts: 113
Rep Power: 4 Dark Flare Knight is on a distinguished road
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;
    }
}
Dark Flare Knight is offline   Reply With Quote
Old May 23rd, 2005, 11:33 AM   #42
Dark Flare Knight
Hobbyist Programmer
 
Join Date: Mar 2005
Location: Canada
Posts: 113
Rep Power: 4 Dark Flare Knight is on a distinguished road
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
Dark Flare Knight is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 2:58 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC