I do not understand the concept of the getPreferredWidth () and getPreferredHeight () methods. What they return means on what basis the values are returned.
What is the difference between getWidth () and getPreferredWidth () ???
Thank..
By default, the # getPreferredHeight () field and the # getPreferredWidth () field return 0. They are designed to override your custom fields with any of your preferred field widths and heights.
, , . , . - .
# getHeight() # getWidth(), , .
# getPreferredWidth() . , . # getWidth() , . # getWidth() , . , .
getPreferredWidth() , ButtonField.
getPreferredWidth()
ButtonField myButton = new ButtonField("Click", USE_ALL_WIDTH){ public int getPreferredWidth(){ return Display.getWidth(); } };
Source: https://habr.com/ru/post/1731834/More articles:python equivalent function - pythonA simple example of scheduling process gangs in Python? - pythonFancybox box positioning? - jqueryto create a site for mobile and PC with django - djangoКак кодировать/декодировать CFUUIDRef в Objective-C - guidChange back button to go back - javascriptsql query adding column values - sqlHow can I get around the method execution in the RhinoMocks layout? - c #crontab oracle problem in linux - linuxGoogle Calendar (shared) - javaAll Articles