The Artima Developer Community
Sponsored Link

Java Answers Forum
Writing to a file

1 reply on 1 page. Most recent reply: Apr 28, 2002 8:07 AM by Thomas SMETS

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
Merete Hanger

Posts: 1
Nickname: d56522
Registered: Apr, 2002

Writing to a file Posted: Apr 26, 2002 6:06 PM
Reply to this message Reply
Advertisement
I have this function, instead of writing to screen,
I want it to write to a file,
if((e.getsource() == firstName) || (e.getsource() == buyTicket))
String nameText = firstName.getText();
FfirstName.setText("Name: " + nameText);
System.out.println("Name: " + nameText);
firstName.setVisible(false);


Thomas SMETS

Posts: 307
Nickname: tsmets
Registered: Apr, 2002

Re: Writing to a file Posted: Apr 28, 2002 8:07 AM
Reply to this message Reply
Look at the following :
static void setIn(InputStream in) 
static void setOut(PrintStream out) 
static void setErr(PrintStream err) 


This will be the simplest I believe !

Rgds,

Thomas,

Flat View: This topic has 1 reply on 1 page
Topic: DefaultStyledDocument blues.... Previous Topic   Next Topic Topic: set up classpath to find packages

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use