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