• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

Make it in Applet, please.....urgent please....

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
respected experts outhere,
please help me to slove this problem.
i wanted to have this program in applet, i tried this but got confuesed with the (system.in).i can't make textfield take the input from user.
i would be grateful if you make applet code out of this program.
import java.net.*;
import java.io.*;
public class client
{
Socket client;

BufferedReader keyin;
BufferedReader in;
PrintWriter out;
String keyinput;
String msg;

public client()
{

try
{

client=new Socket("127.0.0.1",8080);
keyin=new BufferedReader(new InputStreamReader(System.in));

in=new BufferedReader(new InputStreamReader(client.getInputStream()));
out=new PrintWriter(client.getOutputStream(),true);

while(true)
{
try
{
keyinput=keyin.readLine();

out.println(keyinput);

msg=in.readLine();
System.out.println(msg);
}
catch(Exception e)
{
System.out.println("error: "+e.getMessage());
}
}
}
catch(Exception e)
{
System.out.println("error :"+e.getMessage());
}
}
public static void main(String args[])
{
client vclient=new client();
}
}
 
Ranch Hand
Posts: 424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To my knowledge an Applet is not allowed to do things like you want!
If at all you need certifications ... I up to now never did this, so you need help about this stuff too.
 
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic