I'm working on GUI and I'm an amateur programmer. I have a problem with this code. I can't see anything on the frame.
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setBounds(100, 100, 1366, 768);
JPanel contentPane = new JPanel();
contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
setContentPane(contentPane);
contentPane.setLayout(null);
Container midPanel = new JPanel();
midPanel.setLayout(null);
Dimension preferredSize = new Dimension(700, 700);
midPanel.setPreferredSize(preferredSize);
.....
Container k1 = new JPanel();
k1.setSize(50, 700);
k1.setLocation(0, 0);
k1.setLayout(new GridLayout(rowNum, 1));
k1.setVisible(true);
midPanel.add(k1);
.......
Dimension jspD = new Dimension(500,500);
JScrollPane jsp = new JScrollPane(midPanel);
jsp.setPreferredSize(jspD);
jsp.setLocation(0, 0);
jsp.setVisible(true);
contentPane.add(jsp);
I would appreciate your help.