How to set size of swing components

前端 未结 6 1305
挽巷
挽巷 2020-12-22 02:44

I want to customize the height and width of the JTextField objects. I have tried with the setSize method, passing width and height as dimensions and as int as well. But none

6条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-22 03:13

    Size of your components in Swing will depend on the type of layout manager you are using. If you want full control of UI, you can use a Freeflow layout.

    Read the full story here: http://docs.oracle.com/javase/tutorial/uiswing/layout/using.html

提交回复
热议问题