I am developing an application with java using JavaView WebView to have two browsers and with each of these browsers to connect to the same web with two different users. To create the browsers I created a Web Browser class that extends JPanel and contains the corresponding objects:
public class NavegadorWeb extends JPanel {
private Stage stage;
private WebView browser;
private JFXPanel jfxPanel;
private WebEngine webEngine;
...
}
This means that each instance of Web Browser should have its independent WebView objects, and supposedly with its internal data as credentials, etc ... I have both browsers correctly loaded and working, the problem comes when I connect to one of the web browsers with one user, that when updating the other, connects with the same credentials. That is, when I connect with a browser the other takes the same user, so I can not get two independent browsers connected with two different users. Next I summarize the main class where I define the Web Browser objects and where I install them.
public class TPV extends JFrame implements ActionListener {
public NavegadorWeb PanelTPV, PanelCompra;
...
private void configurarPaneles(){
PanelTPV = new NavegadorWeb(url);
PanelCompra = new NavegadorWeb(url);
...
}
...
}
Instancio with the same url, and from there should be able to login with a different user with each, but it is not. Credentials are shared between the two instances. Is there any way that these two instances do not share credentials?
Thanks to antenamo.