Object question with simple SAX application

Hi,

probably a dumb question, been doing some searching and can't come up with the answer.

I'm writing a simple Swing application that parses an xml file against a schema.

I have a class with my Gui that has an inner ActionListener, then I have my Parser class, and a separate content handler class,.

I have a tester class with a main method that creates a gui object. In one of the Listener classes in that class, I create a parser object. In the parser class, the handler class doesn't have an object, but the handler is registered with the parser class.

In the handler class is where all the callback methods are, I can create a string that has the results I want, but I don't know how to pass it back to the gui to display it.

thanks for any help. I can post the code, but there's a lot of it.

bp

[859 byte] By [badpersona] at [2007-11-27 11:18:20]
# 1

Oh, another question.

this app so far can successfully output a txt file. I'd like to creat a button on the gui that will launch notepad and view the file. Do I need runtime.exec() for that?

thanks,

bp

badpersona at 2007-7-29 14:30:19 > top of Java-index,Java Essentials,New To Java...
# 2

> In the parser class,

> the handler class doesn't have an object, but the

> handler is registered with the parser class.

What?

> In the handler class is where all the callback

> methods are, I can create a string that has the

> results I want, but I don't know how to pass it back

> to the gui to display it.

Eh? Doesn't the GUI invoke SAX? So presumably things get back to the GUI a return values.

It sounds like you're making your tests too complicated.

paulcwa at 2007-7-29 14:30:19 > top of Java-index,Java Essentials,New To Java...
# 3

> this app so far can successfully output a txt file.

> I'd like to creat a button on the gui that will

> launch notepad and view the file. Do I need

> runtime.exec() for that?

Yeah, or you could use ProcessBuilder if you're using JDK 1.5 and up.

Apparently some Swing widgets can edit text files pretty well. It would probably be better to use that.

paulcwa at 2007-7-29 14:30:19 > top of Java-index,Java Essentials,New To Java...