Applet Error



Share on Google+Share on Google+

Applet Error
2 Answer(s)      7 years ago
Posted in : Applet

I had an application where i designed an applet to get the database values into the applet when i clicked a line...
It works fine when i implemented this in the local system
but when it is in server..
then i'm unable to get the values from the local system...
Null values are returning when i'm accessing the server from my local system
View Answers

May 12, 2010 at 4:12 PM

Hi Friend,

Please post your code.


May 12, 2010 at 4:38 PM

public class circuit extends Applet implements MouseListener{
boolean rect1Clicked,rect1Clicked1,mouseEntered;
RTextLine text = new RTextLine();
Connection con=null;
Statement stmt,stmt1,stmt3;
ResultSet rs,rs2;
String str1,str2,str3,str4,s1,str5,str6;

public void init(){




catch(Exception e){


public void mouseClicked (MouseEvent me) {

int xpos= me.getX();
int ypos= me.getY();

if(xpos>=25 && xpos<=35 && ypos>=540 && ypos<=645)

rect1Clicked = false;
public void paint(Graphics g) {
....Some Painting Lines Code Here....
if (rect1Clicked)

g.drawString("("+str1+", ",80,690);
...Some Painting Lines Code Here...
public void res(String s) {
String mid=null;

ResultSet rs3=stmt3.executeQuery("select mid from table1 where lname='"+s+"';");


ResultSet rs = stmt1.executeQuery("select Frequency,RPhaseVoltage,ActivePower from mydb.instantaneousdata where meterid='"+meterid+"';");
rs2 = stmt.executeQuery("SELECT ActiveExportTotal,StartDate,StartTime FROM mydb.energysnapshotdata where mid='"+mid+"';");

str1 = rs.getString("Frequency");
str2 = rs.getString("RPhaseVoltage");
str3= rs.getString("ActivePower");

str5= rs2.getString("StartDate");
str6= rs2.getString("StartTime");

catch(Exception e){


This is my code....

There r some code left which i didn't included in the above it is a very large code which isn't necessary for finding the error...
as itz only drawing strings or lines


Related Tutorials/Questions & Answers:
Applet Error - Applet
Applet Error  Hi... I had an application where i designed an applet to get the database values into the applet when i clicked a line... It works... Applet implements MouseListener{ boolean
Applet to database error - Applet
Applet to database error  Hi... I had an application where i need to connect to the database for the values to display in the applet.... Following... Applet implements MouseListener{ boolean rect1Clicked,rect1Clicked1,mouseEntered
applet security error - Applet
applet security error  HI, Thanks for your reply. In the sample plugin code, the URL(nspluginurl) you have specified is for netscape navigator. ------------ ----------- Can you please tell me the same for IE url
applet security error - Security
applet security error  hi, i am using netbeans 6.0,apache tomcat server. I implemented the applet in my jsp page using plugin. when i execute my jsp page, the following security error occured. ERROR: Java Plug
java compilation error - Applet
java compilation error  I am getting compilation error in the following code.: public void paint(Graphics g) { switch(screen...; } } Error is: Illegal start of expression Plz. find why am I getting this error
java compilation error - Applet
java compilation error  hi friends the following is the awt front design program error, give me the replay E:\ramesh>javac Note: uses or overrides a deprecated API. Note
java applet run time error - Applet
java applet run time error  Hi, Im new to java applet.please help me. i have create a MPEG movie player in applet. when i run that program it show the error that," Error instantiating class
error in compiling j2me apllication - Applet
error in compiling j2me apllication  hi, in my j2me application for video,m getting only the audio.i ll send the code. package src.video_streaming; import; import
error while running the applet - Java Beginners
error while running the applet  import java.applet.Applet; import...); ++num; } } } } i have problem while running the code , error... prompt. You will be got definitily your output in a applet viewer. Thanks
Applet  Write an applet to display a string in an applet. String should be passed as a parameter to an applet
applet  What is the immediate superclass of the Applet class
Applet  how to run an applet on a web browser
applet  Explain different stages in the lifecycle of an applet with figure.   Stages of Applet: Life cycle of an Applet: init(): This method is called to initialized an applet start(): This method is called after
Applet  Give the class hierarchy of an Applet class
Applet  Write a ava applet that sets blue color foreground and yellow color background at the start of an applet
Applet  Explain the start() and stop() methods of applet life cycle.   Start and Start method of Applet Life Cycle Start () method: The start method of an applet is called after the initialization method init
Applet  Write a short note on applet life cycle
Applet  I have a java applet that has a button. On clicking the button it should disappear and another applet should appear. How to write this code???? Also in login applet after successful login it should display admin applet
Applet  Draw the class hierarchy of an Applet class. Also explain how to set background and forground colors in java
applet  what is applet in java   An applet is a small program that can be sent along with a Web page to a user. Java applets can perform... the following link: Applet Tutorials
Applet  Write a Java applet that drwas a line between 2 points. The co-ordinates of 2 points should be passed as parametrs from html file. The color of the line should be red
applet  applet to open new tab not's my code import java.applet.*; import java.awt.*; import*; import java.awt.event.*; public class NewURL extends Applet implements ActionListener{ public void init
applet - Applet
.  Hi Friend, Try the following code: 1)Create an applet... extends Applet{ public void paint(Graphics g){ g.drawString("Welcome in Java Applet.",40,20); } } 2) Call this applet with html code
Applet - Applet
Applet  what is the concept of applet? what is different between the applet concept and HTML? what is mean by swing?  Hi friend, Applet Applet is java program that can be embedded into HTML pages. Java applets
applet - Applet
*; import java.awt.*; public class CreateTextBox extends Applet implements.../applet/ Thanks
Applet - Applet
Applet   Namaste, I want to create a Menu, the menu name is "Display... java.awt.event.*; public class menu2frame extends Applet implements WindowListener...------------------------"); g.drawString("Demo of Java Applet Window Event Program"); g.drawString("Java
applet problem - Applet
applet problem  How can I create a file in client side by a java applet . Surely it will need a signed applet .But how can a signed applet create a file in the client side
java.lang.OutOfMemoryError - Applet
time.Now when i am running the applet "java.lang.OutOfMemoryError" error  Sir, I am developing an applet game, in the initial state the applet runs very smoothly..All the animations running very
Applet codebase
Applet codebase  What is codebase in applet
embedding class in an applet - Applet
embedding class in an applet  I have an applet that has a set... java.awt.event.*; public class tesURL extends Applet implements ActionListener... a remote controller). I have the applet code for the remote controller
Servlet and Applet - Applet
Invoke and run an Applet from Servlet  How can i invoke and run an applet from servlet. Can anyone provide me the sample code


Advertisement null