0

Hi everyone ! Please I don't know why this line is not working in my code :

JFrame jf = new JFrame()

20th May 2022, 7:36 PM
Michael AHOUANGAN
4 Answers
0
Did you imported library ? not working means how behaving?
20th May 2022, 7:42 PM
Jayakrishna 🇼🇳
0
Yes, of course !👇 import javax.swing.JFrame;
20th May 2022, 7:55 PM
Michael AHOUANGAN
0
import javax.swing.JFrame; public class Program { public static void main(String[] args) { JFrame jf = new JFrame(); jf.setTitle("Animation"); jf.setSize(20,20); jf.setLocationRelativeTo(null); jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); jf.setVisible(true); } }
20th May 2022, 8:04 PM
Michael AHOUANGAN
0
Increase size jf.setSize(200, 300); Add something to frame. JLabel l = new JLabel("New Label"); jf.add(l); try to add a panel and now see...
20th May 2022, 8:25 PM
Jayakrishna 🇼🇳