Search code examples
javaswingjframenetbeans-8sizing

My Jframe form does not comes up when i try to make it responsive


i was trying to make my JFrame form responsive according to screen size but when try my code it doesnt comes up and if i remove the code it works fine.here is my code

Home frame = new Home();
    Dimension screen = Toolkit.getDefaultToolkit().getScreenSize();
    int i = screen.width;
    int j = screen.height;
    frame.setSize(i, j);

please help


Solution

  • i got the answer. and it was really very simple i just need to put

    this.setResizable(flase);
    

    in my constructor.my coding was right