I have just installed NetBeans 7.0 and I am a newbie in NetBeans\' world. can any one tell me how to connect my application to MySQl / Postgres ? I work on Windows XP.
click on window and then select services

then click on databases and select new connection

select driver which you want

then click finish
if you want to check the connection is successful or not
try
{
con=DriverManager.getConnection("jdbc:mysql://localhost/student_result","root","");
JOptionPane.showMessageDialog(null,"connected with "+con.toString());
}
catch(Exception e)
{
JOptionPane.showMessageDialog(null,"not connect to server and message is"+e.getMessage());
}