1

im trying to change the location of my default frame to the point 0,0 But when I use this. it doesn't give suggestions. When I try to do this.setLocation(0,0); it gives an error. I dont know how to set my first frame as a Jframe like:

    Jframe frame = MYFRAME??;

*Im using swing thank you

1 Answers1

1
JFrame frame = new JFrame();
frame.setLocation(0,0);

But don't put it there. See How to best position Swing GUIs? (setLocationByPlatform(true)) for a better alternative.

Community
  • 1
  • 1
Andrew Thompson
  • 168,117
  • 40
  • 217
  • 433