Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Java with AWT  RSS feed

 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello JavaExpert..
>
> I need one small help from you..!
>
> What I need is I want to grab a text file from the given URL and display
> inside the AWT bean called TEXTAREA..!
>
> How do i do this..!
>
> I can get a file content using these following statements...
>
> URL url;
>
> url = new URL("http://tubs2/log/banklog.txt");
>
> // here i can a content of that page inside url but the
> trouble is displaying ii inside Textarea
>
>
> getTextArea1().setText(url);
> //If i do this the name of URL goes inside the Text area
> like "http://tubs2/log/banklog.txt"
> but i need to put a url ..is there any methods to convert
> URL to string..or some other methods
>
> Please anyone help me doing this..
>
> THanks and Regards
> Shailaza
email to : shaila@cavendish.co.uk
 
paul wheaton
Trailboss
Posts: 22255
Firefox Browser IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You mention getting the file content, but I don't see where.
Usually you need to open up some form of InputStream. Are you doing that?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!