Need design idea

Hi, experts.

I am going to deploy a 2D object on a frame or applet then embed ina HTML.

The drawing data will be extracted from a data file in a local machine.

Of course I can save it in the working directory then read it.

But I wouldn't do this way, I would prefer to design a dialog to position and open this file. After I select the file,the program will automately keep running.

Anybody can guide me an origention?(Java or JavaScript)

Thanks.

[490 byte] By [ardmorea] at [2007-11-27 11:00:14]
# 1

Come again?

Joe

Joe_ha at 2007-7-29 12:28:21 > top of Java-index,Java Essentials,Java Programming...
# 2

excuse me?

ardmorea at 2007-7-29 12:28:21 > top of Java-index,Java Essentials,Java Programming...
# 3

> excuse me?

Your "question" is mainly incoherent babbling. Please try and recompose yourself and your question in a less inane fashion.

You have it seems multiple questions.. maybe.

cotton.ma at 2007-7-29 12:28:21 > top of Java-index,Java Essentials,Java Programming...
# 4

> I am going to deploy a 2D object on a frame or applet

> then embed ina HTML.

A frame and an applet are two entirely different things. This statement makes little sense.

> The drawing data will be extracted from a data file

> in a local machine.

I think I understand what you're saying here.

> Of course I can save it in the working directory then

> read it.

This doesn't make much sense. Do you mean the client's working directory? You must mean the client's working directory since you're talking about applets here.

> But I wouldn't do this way, I would prefer to design

> a dialog to position and open this file.

Not sure what you're saying here.

> After I select the file,the program will automately keep

> running.

That makes absolutely no sense at all.

> Anybody can guide me an origention?(Java or

> JavaScript)

Not sure what an "origention" is.

> Thanks.

You're welcome.

Navy_Codera at 2007-7-29 12:28:21 > top of Java-index,Java Essentials,Java Programming...
# 5

That was a **** motivated response!

Joe

Joe_ha at 2007-7-29 12:28:21 > top of Java-index,Java Essentials,Java Programming...
# 6

sorry, english is not my native language. I know the meaning but it is hard to express it.

yes, it is a client directory.

For instance,

private String fileName = "test.txt"

is saved somewhere.

we can parse by

try {

FileReader fr = new FileReader(fileName);

BufferedReader br = new BufferedReader(fr);

but the filename is written in the code.I may read different files.How it can be free of code by using a prompt input?

Sorry again to bother you.

ardmorea at 2007-7-29 12:28:21 > top of Java-index,Java Essentials,Java Programming...
# 7

JFileChooser jfc = new JFileChooser();

int option = jfc.showOpenDialog();

if( option == JFileChooser.APPROVE_OPTION ) {

// do something here;

} else {

// user pressed cancel/close. Handle that here.

}

Navy_Codera at 2007-7-29 12:28:21 > top of Java-index,Java Essentials,Java Programming...