I have made an applet that displays two selection lists. After selecting a value from either of these lists and pressing a button, I'd like to show a different frame (or a panel inside the current frame) with a new interface customized to the selection.
Currently I have a class selectionPanel which looks something like this:
In my main class I call this method after pressing the button as follows:
The newly added panel is not showing up in my main frame. I've tried calling pack() or validate() (suggested in other posts) but this doesn't seem to solve the problem. Do you guys (and possibly girls) have any ideas?
Finally something more useful, through extended logging I got the following messages. After these messages I get the nullpointer exception when trying to query the database because no connection has been created.
Sorry if I have been unclear, but my current applet is coded in Netbeans and deployed using webstart. It creates the html, jnlp etc files for me in the `dist` folder after which I copy them to the wwwroot folder and run them.
When running the applet in appletviewer, it uses the sqljdbc_auth.dll driver file to make the connection. Without this file it doesn't work. Could it be that the applet can't find this file for some reason? Or that the file is not in the right location? It is not loaded explicitly in my code.
So if I understand correctly, it is best to have my database, a man in the middle, and my applet? Where the man in the middle gets HTTP requests from the applet, passes the request to the database, gets the data back and feeds it to the applet which in turn does stuff with it?
If so, how would such a thing look like? Do you know of any good tutorials? My apologies for the amount of questions but I am a noob when it comes to bringing Java to the net. Therefore, I have no idea how to put the theory into effect. Thanks again!
edit I am using this applet solely for demo purposes, so if it is possible to do this with the JDBC driver and without a proxy this would be preferred. I am just not sure why the applet is not connecting since I have gone through signing the applet and such.
I connect to the server with the server-variable: localhost. I am running it locally as long as it is in development. The idea is to deploy it later on to a server that can be accessed through the internet. The database will reside on that same server.
The ip of my machine is 192.168.0.172. The server is running on my pc so I guess its the same? If not, how can I find out? Because if it's ip is different ip from my localhost it could explain the problems I'm having.
Thanks for your replies! The programming is executing because it loads the required settings from a file on the server. It then prints every statement I insert up until
In wireshark, what should I be looking for ? there is a lot of output.
My Java applet is designed to read data from a database and display it to the user using several external visualisation libraries.
After spending hours on fixing security issues I think I have resolved them by now. At least, I am not getting errors in the console anymore.
My program uses the below code to connect to the DB and it just hangs on Drivermanager.getConnection. I have waited for at least 10 minutes and no errors show up.
the sqljdbc4.jar is included in the main jar, all jars are signed, I access the applet through Chrome and the dll-driver file is also present in the Main jar. Any idea what could be causing this? I know that applet and database have to reside on the same ip and they do (at least: my sql server is running on my laptop and my code is running in the wwwroot of my IIS on the same laptop).