i want to place a button on upper left corner of JFrame with GridBagLayout.i write this code but it is notwork correctly

        gbc.gridx=0;
        gbc.gridx=0;
          add(b1,gbc);

but the button place on center of JFrame why

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.