This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Swing / AWT / SWT and the fly likes Newbie  Question?? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Newbie  Question??" Watch "Newbie  Question??" New topic
Author

Newbie Question??

Bikash Paul
Ranch Hand

Joined: Dec 04, 2001
Posts: 342
Hi,
I have one interface on swing now I want to send a query to servlet on the action of button to take the size of the file which in the server by matching the file name.My story is like that iam developing one interface of data transfer from one destination to another.Now I want to give facility to client so that they can stop transfer of one file in between and start another new file from scratch.And when they want to restart that file which they stopped in between,they can.For that I want that when they click on "resume" button I want to send one query from my interface to servlet to take the size of the file by matching the file name so that it can skip() that portion in reading and can send remain portion to servlet for appending in the file.But I couldn't decide what will be the syntax for that query.Iam attaching those portion of my interface where my resume button starts to work:-
send.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
{
xfer.setPaused(false);
log("** Transfer resumed.");
String base;
String fn;
base = servlet.getText();
fn = filename.getText();
if (fn.length() < 1) {
log("File name too short.");
return;
}
if (base.length() < 7) {
log("Servlet base URL too short.");
return;
}
if (uc != null) {
log("Transfer in progress, please wait.");
return;
}
File f = new File(fn);
String path = destdir.getText();
String result;
result = doSendToServletPart1(base, path, f);
log(result);
}
});
Any help will be highly apprecited.
Regards
Bikash
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Newbie Question??