Untitled
Untitled
Untitled
event.
importjava.awt.*;
importjava.applet.*;
/*
</applet>
*/
intmouseX = 0, mouseY = 0
add-------------(this);
mouseX = me.getX();
mouseY = me.getY();
msg = "*";
repaint();
}
public void paint(Graphics g)
import java.applet.*;
import java.awt.event.*;
</applet>*/
l.add("AJP");
l.add("OMD");
l.add("MAN");
add(l);
l.addActionListener(this);
msg=e.getActionCommand();
repaint();
g.drawString(msg,100,100);
}
What will be the output of following prgram?
import java.awt.*;
import java.awt.event.*;
Sample(String title)
super(title);
addWindowListener(new WindowAdapter());
setSize(400,400);
setVisible(true);
setVisible(false);
System.exit(0);
}
For the following code, fill up the correct listener name and event name.
import java.awt.*;
import java.awt.event.*;
import java.applet.*;
</applet> */
addKeyListener(this);
requestFocus();
}
showStatus("Key Down");
showStatus("Key Up");
msg += ke.getKeyChar();
repaint();
g.drawString(msg, X, Y);
}
Which Statement is given the error in the following code
import java.sql.*;
class dataI
try
DriverManager.registerDriver(d);
Statement s=con.createStatement();
if(n==1)
{
System.out.println("Record inserted ");
con.close();
catch(Exception e)
System.out.println("not Inserted"+e);
import java.sql.*;
import java.io.*;
String Name;
int Age;
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
System.out.println("Driver Loaded");
}
Select missing lines in following code to get ouput .
import java.io.*;
import javax.servlet.*;
ServletConfig config=null;
this.config=config;
System.out.println("servlet is initialized");
throws IOException,ServletException{
res.setContentType("text/html");
out.print("<html><body>");
out.print("</body></html>");
}
Consider the following program and identify the missing statement.
HttpServletResponse response)
response.setContentType("text/html");
PrintWriter out = response.getWriter();