Click here to Skip to main content
15,891,513 members
Home / Discussions / Java
   

Java

 
AnswerRe: java Pin
Richard MacCutchan28-Oct-12 0:23
mveRichard MacCutchan28-Oct-12 0:23 
AnswerRe: java Pin
TorstenH.29-Oct-12 0:38
TorstenH.29-Oct-12 0:38 
AnswerRe: java Pin
April Fans26-Dec-12 17:13
April Fans26-Dec-12 17:13 
QuestionForcing Eclipse webapp home page when debugging Pin
kmg36526-Oct-12 11:53
kmg36526-Oct-12 11:53 
AnswerRe: Forcing Eclipse webapp home page when debugging Pin
hbwhypw31-Oct-12 22:46
hbwhypw31-Oct-12 22:46 
GeneralRe: Forcing Eclipse webapp home page when debugging Pin
kmg3651-Nov-12 10:24
kmg3651-Nov-12 10:24 
GeneralRe: Forcing Eclipse webapp home page when debugging Pin
hbwhypw1-Nov-12 16:04
hbwhypw1-Nov-12 16:04 
QuestionIam Facing Problem While Storing record’s in Access Using Applet … Pin
PrabaPrakash25-Oct-12 22:06
PrabaPrakash25-Oct-12 22:06 
Error:
java.security.AccessControlException: access denied (java.lang.RuntimePermission accessClassInPackage.sun.jdbc.odbc)

My COde:

import java.awt.*;
import java.awt.event.*;
import java.applet.*;
import java.sql.*;
import sun.jdbc.odbc.*;

/*
<applet code="register" width=250 height=200>
</applet>
*/

public class register extends Applet implements ActionListener,ItemListener
{
Label l1,l2,l3,l4;
TextField t1,t2,t3,t4;
Button submit;

public void init()
{
l1=new Label("RegNo.:");
l2=new Label("Name.:");
l3=new Label("Course.:");
l4=new Label("year.:");
t1=new TextField("regno");
t2=new TextField("name");
t3=new TextField("course");
t4=new TextField("year");
submit=new Button("submit");
add(l1);
add(t1);
add(l2);
add(t2);
add(l3);
add(t3);
add(l4);
add(t4);
add(submit);
t1.addActionListener(this);
t2.addActionListener(this);
t3.addActionListener(this);
t4.addActionListener(this);
submit.addActionListener(this);
}
public void itemStateChanged(ItemEvent ie)
{
repaint();
}
public void actionPerformed(ActionEvent ae)
{
repaint();
}
public void paint(Graphics g)
{

Connection c=null;
Statement s=null;

String a,b,d,h;
a=t1.getText();
b=t2.getText();

d=t3.getText();
h=t4.getText();
g.drawString("Reg.no.:"+a,6,100);
g.drawString("Name.:"+b,6,120);
g.drawString("Course.:"+d,6,140);
g.drawString("year.:"+h,6,160);


try
{

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); //Driver to connect the ODBC JDBC Bridge

c=DriverManager.getConnection("jdbc:odbc:da","system","manager"); //Connect the Data Source Name

s=c.createStatement();
System.out.println("Database Created");

int count=s.executeUpdate("insert into Table1(regno,name,course,year) values('"+a+"','"+b+"','"+d+"','"+h+"')");
//g.drawString("Record Added");
if(count==1)
g.drawString("Record Added",6,180);

}


catch (Exception e)
{
System.out.println(e);
}
}
}
AnswerRe: Iam Facing Problem While Storing record’s in Access Using Applet … Pin
Nagy Vilmos25-Oct-12 23:08
professionalNagy Vilmos25-Oct-12 23:08 
GeneralRe: Iam Facing Problem While Storing record’s in Access Using Applet … Pin
PrabaPrakash26-Oct-12 8:30
PrabaPrakash26-Oct-12 8:30 
GeneralRe: Iam Facing Problem While Storing record’s in Access Using Applet … Pin
jschell26-Oct-12 8:49
jschell26-Oct-12 8:49 
AnswerRe: Iam Facing Problem While Storing record’s in Access Using Applet … Pin
jschell26-Oct-12 8:55
jschell26-Oct-12 8:55 
GeneralRe: Iam Facing Problem While Storing record’s in Access Using Applet … Pin
PrabaPrakash2-Nov-12 20:59
PrabaPrakash2-Nov-12 20:59 
Questiondisplay GROUP BY result Pin
uti123fil23-Oct-12 21:48
uti123fil23-Oct-12 21:48 
AnswerRe: display GROUP BY result Pin
Richard MacCutchan23-Oct-12 22:05
mveRichard MacCutchan23-Oct-12 22:05 
GeneralRe: display GROUP BY result Pin
uti123fil23-Oct-12 22:36
uti123fil23-Oct-12 22:36 
GeneralRe: display GROUP BY result Pin
Richard MacCutchan23-Oct-12 22:41
mveRichard MacCutchan23-Oct-12 22:41 
AnswerRe: display GROUP BY result Pin
Richard MacCutchan24-Oct-12 1:14
mveRichard MacCutchan24-Oct-12 1:14 
GeneralRe: display GROUP BY result Pin
uti123fil8-Nov-12 17:11
uti123fil8-Nov-12 17:11 
QuestionHow to make GAME by Java? Pin
nghia09t322-Oct-12 16:05
nghia09t322-Oct-12 16:05 
AnswerRe: How to make GAME by Java? Pin
TorstenH.22-Oct-12 20:32
TorstenH.22-Oct-12 20:32 
AnswerRe: How to make GAME by Java? Pin
Richard MacCutchan22-Oct-12 22:38
mveRichard MacCutchan22-Oct-12 22:38 
AnswerRe: How to make GAME by Java? Pin
Gowtham Gutha9-Nov-12 9:05
Gowtham Gutha9-Nov-12 9:05 
QuestionDeveloping Cloud Storage Services Pin
Member 925151319-Oct-12 4:20
Member 925151319-Oct-12 4:20 
AnswerRe: Developing Cloud Storage Services Pin
TorstenH.22-Oct-12 0:28
TorstenH.22-Oct-12 0:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.