JFrame kann nicht in Komponenten konvertiert werden

Post a reply

Smilies
:) :( :oops: :chelo: :roll: :wink: :muza: :sorry: :angel: :read: *x) :clever:
View more smilies

BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: JFrame kann nicht in Komponenten konvertiert werden

by Guest » 08 Feb 2025, 17:37

Ich schreibe einen Code und am Ende zeigt er einen Fehler, da JFrame nicht in Komponenten konvertiert werden kann.

Code: Select all

    initComponents();

try{

Connection con=ConnectionProvider.getCon();

Statement st=con.createStatement();

ResultSet rs=st.executeQuery("select count(id) from question");

if(rs.first())

{

int id=rs.getInt(1);

id=id+1;

String str=String.valueOf(id);

jLabel4.setText(str);

}

else

jLabel4.setText("1");

}

catch(Exception e)

{

JFrame jf=new JFrame();

jf.setAlwaysOnTop(true);

JOptionPane.showMessageDialog(jf, e);

}

}
Das Endteil, in dem es JOptionPane It ist, zeigt Fehler bei, wenn ich jf
Ich bin sehr neu in der Codierung von pls hilf

Top