3

I am asking because if you are coding and testing against JX generated browser, and say you want to inspect elements to add to the code, or inspect a button to see a link, you shouldn't have to open up another browser, follow the same clicks to do that.

Is there a way to enable a full browser window? Including all functionalities of a normal browser? Address field and so on??

            Browser browser = jx.browser;

            BrowserView browserView = new BrowserView(browser);

            JFrame frame = new JFrame();
            frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
            frame.add(browserView, BorderLayout.CENTER);
            frame.setSize(1024, 768);
            frame.setLocationRelativeTo(null);
            frame.setVisible(true);

            browser.loadUrl("http://www.google.com");
mjs
  • 21,431
  • 31
  • 118
  • 200

1 Answers1

2

If you would like to inspect HTML elements on the loaded web page anytime, then I recommend that you run your application with the --remote-debugging-port Chromium switcher every time. You can read more about this switcher at https://jxbrowser.support.teamdev.com/support/solutions/articles/9000013082-remote-debugging-port

JxBrowser doesn't provide "full" browser window with tabs, address bar, etc. JxBrowser is just a component/library, not an entire desktop application. Using this library you can build your entire desktop application with tabs, address bar, etc.

Vladimir
  • 1
  • 1
  • 23
  • 30
  • I've been doing this for a while, however an annoying thing is that if you decide to right click an element and 'copy selector' one will get Clipboard is not enabled in hosted mode. Please inspect using chrome://inspect. See : https://stackoverflow.com/questions/45723541/chrome-inspector-remote-debugger-clipboard-is-not-enabled-in-hosted-mode-pl It's annoying to have to surf to another browser and repeat the steps. – mjs Aug 21 '17 at 14:58
  • errr... is it possible for jxbrowser have the 'right click save as picture' ? – gumuruh Oct 21 '20 at 02:47