The setSize() Method in my JFrame class is not working due to an API error

29 Views Asked by At

i was working with the JFrame class and i was trying to create an empty frame,but when i try to use the setSize() method,it shows some API error,something like Usage of API documented as @since 1.6+9 enter image description here

I just want to create an empty frame but the method i need to set the size for the frame is giveing an error related to API

1

There are 1 best solutions below

0
moyu-sharo On

You should use with Dimension class as parameter.

jframe.setPreferredSize(new Dimension(500, 600));
jframe.setSize(new Dimension(500, 600));