i have created project in java.now the problem is that i want to create html file for my project that contains some inf regarding my project.but i dont know the way to link this html file to my java program.
Advertisements. Register and be a member of the community to get rid of them.
You will have to create a JPanel (remember vaguely about this...) with a JTextArea and JTextPane etc... Search for how to create a browser in Java - this will give you ideas of what to do...
You will have to create a JPanel (remember vaguely about this...) with a JTextArea and JTextPane etc... Search for how to create a browser in Java - this will give you ideas of what to do...
Arun
that way i know but it is very time consuming.cant i call microsoft IE from my java program
the request was for directly starting Microsoft IE so is the code.
Runtime.exec() is the method to call external program, and thus it will not be OS independant.
What you can do is to ask for path to browser file while starting the program and then call that browser in exec() call.
You can pass url as command line parameter in exec() call.
my actual problem is that-------
i have created one html file.
now i want to open that html file in web browser on click event of a button in java.
plz reply........
do as he said: Runtime.exec(path to html filename)
also, don't forget to put it in the appropriate event... btw.. this will open the html file in the default web browser on the system. Or maybe it opens it with a text editor(if ur user has set it up that way... web designers generally do that )
__________________
If there wasn't greed, we still would have been single-celled organisms.