The Artima Developer Community
Sponsored Link

Java Answers Forum
hello problem in this code want solution

4 replies on 1 page. Most recent reply: Jun 18, 2002 3:36 AM by abhijeet

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 4 replies on 1 page
biswajit sarangi

Posts: 5
Nickname: sarangi
Registered: Jun, 2002

hello problem in this code want solution Posted: Jun 18, 2002 12:47 AM
Reply to this message Reply
Advertisement
hello me abijit
the user input should b captured in the targetstring and .can any one help me .



import java.awt.*;
import java.awt.event.*;
import java.applet.*;
import java.net.*;
import java.lang.*;

public class ShowService12 extends Applet {

//String str1 ="http:"//xxx.xx".xx.xx:yyyy/invoke/tools/OrdersPosition?VBELN=";
//String str2 ="PO_NUMBER.getText()";

String targetString;
TextField PO_NUMBER;
URL targetURL ;
String str2;
public void init() {


setLayout(new FlowLayout(FlowLayout.LEFT));

setBackground(Color.red);
setForeground(Color.blue);



Button b = new Button("Click To See The PO");
add(b);
b.addActionListener(new ActionListener() {

public void actionPerformed(ActionEvent ae) {

try {
String str1 ="http:" + "/ " + "/" + " xxx.xx.xx.xx:yyyy/invoke/tools/OrdersPosition?VBELN=";
str2 = PO_NUMBER.getText();

targetString = str1 + str2;

targetURL = new URL(targetString);
}
catch (Exception ex){}

}
});

Label PO_NUMBERp = new Label("PO_NUMBER: ", Label.RIGHT);
TextField PO_NUMBER = new TextField(12);
add(PO_NUMBERp);
add(PO_NUMBER);


PO_NUMBER.addActionListener(new ActionListener() {

public void actionPerformed(ActionEvent e) {

getAppletContext().showDocument(targetURL);

}

});

}

public void stop() {
System.out.println("Ok This Is Fine");
}
}


abhijeet

Posts: 21
Nickname: sony
Registered: May, 2002

Re: hello problem in this code want solution Posted: Jun 18, 2002 1:08 AM
Reply to this message Reply
Hi Biswajit,

You are going in the correct way. Tell me what's the problem you are facing? Are you able to get the targetString value?

abhijeet.

biswajit sarangi

Posts: 5
Nickname: sarangi
Registered: Jun, 2002

Re: hello Posted: Jun 18, 2002 2:26 AM
Reply to this message Reply
my requirment is an applet which has one button one textfield.
what ever the user gives the input in the textfield should be added to the fixed string (targetstring)and when i press the button should open the document .
hello sorry to disturb you but i think you can help me out.

biswajit sarangi

Posts: 5
Nickname: sarangi
Registered: Jun, 2002

Re: hello Posted: Jun 18, 2002 2:57 AM
Reply to this message Reply
abijit bhai can we b friends .
Well i am studying in germany at karlsruhe university.
I am very tired of this program since 5 days i am in this program only .i know my uni server url and every thing want ot make some thing but my problem is in front of you .may be my code is not properly written .If you can give some time then may be i will be able to continue the subject.Thank you.
biswajit sarangi
from orissa
and you.
wating for your reply.

abhijeet

Posts: 21
Nickname: sony
Registered: May, 2002

Re: hello Posted: Jun 18, 2002 3:36 AM
Reply to this message Reply
Hi Biswajit,

Go throught the following link : http://www.javaworld.com/javaworld/javatips/jw-javatip94.html

You can find your solution using Servlets over here.
Hope this link helps you to solve the problem.


abhijeet from hyderabad.

Flat View: This topic has 4 replies on 1 page
Topic: cpu usage Previous Topic   Next Topic Topic: Program not Working(For Loop)

Sponsored Links



Google
  Web Artima.com   

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