I cant see the text appearing from top left corner... how can i modify the code to do this
JFrame frame= new JFrame("frame name");
frame.setVisible(true);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setSize(500,500);
String t=Integer.toString(x);
JPanel panel = new JPanel(new GridBagLayout());
frame.getContentPane().add(panel, BorderLayout.NORTH);
GridBagConstraints c= new GridBagConstraints();
// frame.add(panel);
JLabel label= new JLabel(t);
c.gridx=0;
c.gridy=0;
c.insets = new Insets(10, 10, 10, 10);
panel.add(label,c);
JLabel labe2= new JLabel("10");
c.gridx=500;
c.gridy=50;
//c.insets = new Insets(10, 10, 10, 10);
panel.add(labe2,c);