Li Wu:
Good study and thinking, honouring teachers save Thanksgiving. Leaf See root three return to one, rivers the same oneness.
Meekness Conscience Lord, willing to do without regrets to the most bitter. Reading exercise strong body and mind, Prudential advised and the line and cherish.
Os:windows7 x64
Jdk:jdk-8u131-windows-x64
Ide:eclipse Oxygen Release (4.7.0)
Code
Package Com.jizuiku;import Java.awt.component;import Java.awt.frame;import java.awt.toolkit;/** * * * @ Author Blog Park-give the most bitter * @version V2017.11.19 */public class Demo {public static void main (string[] args) {frame F = new frame (); Set size int width = n; int height =; F.setsize (width, height); The middle of the screen shows form Center (f); Visible f.setvisible (true);} /** * Pass in a form, set its center display * * */public static void Center (Component c) {Toolkit kit = Toolkit.getdefaulttoolkit (); int x = (Kit.getscreensize (). Width-c.getwidth ())/2;int y = (kit.getscreensize (). Height-c.getheight ())/2;c.setlocation (x, y );}}
Effect
Java is good, worth learning.
Learning resources: Itcast and Itheima Video library. If you have public resources, can share to me, with your resources to learn can also
Blog post is to watch the video, into thinking written. It's good that the teacher speaks well. Blog bad, is to give the most bitter not serious.
Javase base AWT Frame form appears in the middle of the screen