I´ve already searched for related posts on stack, but didn´t find quite the right answer; Im using THIS to display a .pdf file in my frame.
Now I want to use the JWebBrowser.navigate()
+ (filePath + "#search=anyString")
to search this .pdf file for the specific string.
Unfortunately I´m unable to reload the JWebBrowser afterwards. So the correct filepath is submitted (checked that in the pdf adress bar), but the JWebBrowser turns gray and nothing happens.
When using the navigate()
to load another file and afterwards navigate to the old file again, it works just fine.
I tried revalidate()
, repaint()
and stuff like this but I cant get this to work.
Example:
btnTest.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
browser.navigate(filePath + "#search=flower");
browser.revalidate();
browser.repaint();
}
});
I appreciate any kind of advice!
Thanks!