ResultSet cannot be resolved to a type
ResultSet rs = stmt.executeQuery(sql);
public class Main {
public static void main( String[] args )
{
try
{
final JFrame frame = new JFrame( "Information" );
final JPanel mainPanel = new JPanel();
mainPanel.setPreferredSize ( new Dimension( 800, 700 ) );
frame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
frame.getContentPane().add ( mainPanel );
frame.setLocationRelativeTo( null );
// JTextArea supports a subset of HTML and with that you
// can change fonts within the text.
final JTextArea textArea = new JTextArea(
"This is an editable JTextArea. "
+ "A text area is a \"plain\" text component, "
+ "which means that although it can display text "
+ "in any font, all of the text is in the same font." );
textArea.setFont( new Font( "Serif", Font.BOLD, 12 ) );
textArea.setLineWrap( true );
textArea.setWrapStyleWord( true );
mainPanel.add( textArea );
frame.pack();
frame.setVisible( true ); // should be last
beep();
}
catch( final Exception e )
{
final JPanel panel2 = new JPanel();
JOptionPane.showMessageDialog( panel2, e, "Error",
JOptionPane.ERROR_MESSAGE );
}
}