Dale Bradley

Greenhorn
+ Follow
since May 08, 2012
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
1
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Dale Bradley

Hi all,

I have a Java applet composed of 2 classes that reads/writes data to a MySQL database. I had some trouble getting it to work in a browser, but it now runs fine (signing and a few tweaks). However, i wanted to see if it would run on a friends server.

This is where i am having a problem. The server has extendcp with phpmyadmin. Im not familiar with these. When trying to run my applet from the server, i get a error message like this:

"The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server."

I had no such error on my own browser on my own rig. What i believe the problem is due to is the fact that because MySQL is not in a standard directory (its bundled with the above programs) its having trouble communicating. But the point of my post is for 2 things:

1. Does anybody have any experiences similar to this?
or
2. What could i use an alternative to an Applet as i understand they are outdated. Is there an easy way for me to convert my applet? What would the advantages be in terms of setting up the server and also in general?

Any info would be great, thanks in advance!
8 years ago
Thanks for the speedy advice guys!

Im going to try and separate the GUI into a different class and look to bundle a few things together to break it up.

Again, thanks!
8 years ago
I have a fairly simple Applet which i have finished (still figuring out how to get it to run in a browser, but i have all the functionality finished). It communicates with a database i have set up in MySQL. However, the class has a very large amount of lines and i just dont feel comfortable with the length. Its around 1400 lines.

I used windowbuilder in Eclipse for the GUI which takes around 700 lines. Its got multiple tabs and lots of buttons etc. Then i have around 18 methods which are basically get and set methods for the database. I have cut it down as much as i can in terms of redundant code. However, im just wondering if you gurus know how i can reduce the size?

Am i right in concluding that splitting up the GUI from my main applet class would cause a problems with accessing GUI components? The app constantly changes and updates the GUI with information from the DB.

I feel i understand OO concepts but because this is just a 'questionnaire' and nothing more, i am unsure on how to reduce the size. ANY info would be great!!

Thanks in advance
8 years ago
Ah thanks a lot for that!

So, my error is that it cannot find the MySQL driver. I have added the jar to the jdk so im not sure what it could be. I will continue to look for a solution.

Thanks a lot for that tip, i was under the impression that the console in Chrome would supply me with that info, but clearly i was wrong!

8 years ago
Hi, im a new member here although i have been lurking for a few years!

I just realised that i originally posted in the wrong forum section, so sorry.

My problem:

I have created a java applet which is linked to a database in MySQL. It queries and updated the tables within depending on user interaction.
My applet runs fine from within Eclipse but i seem to be running into a similar problem to many others. I have looked over MANY threads on this problem but have yet to find a definitive answer/solution. They all seem to differ. I have picked up information from these threads but i am still a bit confused. When i open my applet through a html file nothing happens, no error messages, nothing. I have commented out my code and just painted a line of text and it works, so i dont believe its my html file thats the issue. What i would like to know from you gurus is:

1. Do i have to create a jar (i have tried this but is it necessary?)
2. Do i have to get my applet signed to enable the database interaction whilst running in a browser?
3. Could there be another reason why my applet will not load?

The GUI is displayed but nothing is pulled from my database.

This is extremely frustrating! It will eventually be placed on a server along with the database.

I can post the code if required, although it has quite a high amount of lines. Any help would be GREATLY appreciated!
8 years ago
Hi, im a new member here although i have been lurking for a few years!

Im not sure if this is the correct sub forum to be posting in and i apologize if it is not.

My problem:

I have created a java applet which is linked to a database in MySQL. It queries and updated the tables within depending on user interaction.
My applet runs fine from within Eclipse but i seem to be running into a similar problem to many others. I have looked over MANY threads on this problem but have yet to find a definitive answer/solution. They all seem to differ. I have picked up information from these threads but i am still a bit confused. When i open my applet through a html file nothing happens, no error messages, nothing. I have commented out my code and just painted a line of text and it works, so i dont believe its my html file thats the issue. What i would like to know from you gurus is:

1. Do i have to create a jar (i have tried this but is it necessary?)
2. Do i have to get my applet signed to enable the database interaction whilst running in a browser?
3. Could there be another reason why my applet will not load?

This is extremely frustrating! It will eventually be placed on a server along with the database.

I can post the code if required, although it has quite a high amount of lines. Any help would be GREATLY appreciated!
8 years ago