Hi All!
I have an AWT Application, on a button click i need to open OpenJump
application with a default vector data set(e.g. shp files) into the default
project i.e. default taskFrame.
To open OpenJump I am using into my application
JUMPWorkbench.main(arg)
So I have an array of data set.
String[] shpFiles = {}
now I want to pass this dataset as an argument. Is it possible to pass this
data set as command line argument? Or any other way?
Anyone please help.
****followings are the code snipat****
public class AWTEntryPoint {
public static void main(String[] args){
Button b;
ActionListener myActionListener = new MyActionListener(args);
Frame myFrame = new Frame("Java Applet");
myFrame.add(b = new Button("Open Jump"), BorderLayout.NORTH);
b.setActionCommand("Open Jump");
b.addActionListener(myActionListener);
myFrame.add(b = new Button("Exit"), BorderLayout.SOUTH);
b.setActionCommand("Exit");
b.addActionListener(myActionListener);
myFrame.pack();
myFrame.show();
}
}
class MyActionListener implements ActionListener {
private String[] params;
public MyActionListener(String[] param)
{
params = param;
}
public void actionPerformed(ActionEvent ae) {
String s = ae.getActionCommand();
if (s.equals("Exit")) {
System.exit(0);
}
else if (s.equals("Open Jump")) {
System.out.println("Open Jump");
try {
//OpenJump Application
JUMPWorkbench.main(params);
} catch (Exception e) {
// TODO Auto-generated catch
block
e.printStackTrace();
}
System.out.println("Map opened");
}
else {
System.out.println(s + " clicked");
}
}
}
Regards
Sankar
________________________________
::DISCLAIMER::
-----------------------------------------------------------------------------------------------------------------------
The contents of this e-mail and any attachment(s) are confidential and intended
for the named recipient(s) only.
It shall not attach any liability on the originator or HCL or its affiliates.
Any views or opinions presented in
this email are solely those of the author and may not necessarily reflect the
opinions of HCL or its affiliates.
Any form of reproduction, dissemination, copying, disclosure, modification,
distribution and / or publication of
this message without the prior written consent of the author of this e-mail is
strictly prohibited. If you have
received this email in error please delete it and notify the sender
immediately. Before opening any mail and
attachments please check them for viruses and defect.
-----------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3.
Spend less time writing and rewriting code and more time creating great
experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev
_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel