Yadagiri Rao KP wrote:
> I want to show a window from a java application .The details are
> I have a button "command help" and a combo box which has all the unix
> commands.
> When I select any of the commands from the combo box and press command
> help,I want to show a window with contents of manual help contents in
> the new window--if we type man on unix or linux we get a page of help
> page.In order to achieve this what should I do?
> At the end,I want to achieve 2 things.
> 1.Create a new window from an existing window.
This is not different from creating a single window.
> 2.with contents of help - manual.
For small apps, you could do the following. Have two String arrays, one
for the names of the commands, and one for the manual pages of the
commands. The indexes of these arrays must correspond to eachother. For
example, if index 0 of the name array is "my command" then index 0 of
the other array is "The man page for my command". Then when the user
presses the help button, you check which index of the name array the
currently selected item is, and then show a window containing the
manpage from that index of the second array.
For bigger apps this will consume too much memory. Better use a database.
> PLease help
> Yadagiri RAo
--
Daniel Sjöblom
|