assembly process, which contains the classes that define the constituent parts, including the interfaces that assemble the parts into the final product.Role builder: [Java] View plaincopyprint? On code to see a snippet derived from my Code slice public interface Personbuilder {void Buildhead (); void Buildbody (); void Buildfoot (); Person Buildperson (); }Role ConcreteBuilder: [
Atitit. Gui skin and skin replacement summary java. net c ++, atitit.gui.net
Atitit. Gui skin and skin replacement summary java. net c ++
1. Swing skin 1
1.1. windows style 1
1.2. Mac style (liquid framework) 1
2. How to add a watermark or background to an application? 2
3. Common swing skin package substance, JTatto
[]){ new JFrame(“我的第一个窗口”); mw.setSize(250,200); new JButton(“我是一个按钮”); mw.getContentPane().add(button); mw.setVisible(true); }}When writing GUI programs with swing, it is not usually necessary to create a Window object directly with JFrame, but to create a Window object with a subclass derived from JFrame, and to include the specific requirements and special contents of the window in the subclass.//define JFrame
sample code that enables all the policies and rules in the current situation, when common rules are violated in the program, the related prompt information window is displayed:
Strictmode. setthreadpolicy (New strictmode. threadpolicy. Builder ()
. Detectall ()
. Penaltylog ()
. Penaltydialog () // print logcat. You can also locate Dropbox and save the corresponding log through the file.
. Build ());
Strictmode. setvmpolicy (New strictmode. vmpoli
Return the image source code, re-open a class paste canPackage Cn.littlepage.game;import Java.awt.image;import Java.awt.image.bufferedimage;import java.io.IOException; Import Java.net.url;import Javax.imageio.ImageIO;PublicClassGameutil {//The tool class is best to privatize the constructor./** Load Picture Code * Returns the picture object for the specified picture*/private Gameutil () {}/* * * Returns the picture object of the specified path file * @param path * @return */public static image
"AWT"surface) programming. the various elements of Note: AWT has a certain flaw in cross-platform, and the newer programming method is swing (in the Javax.swing Class). Java--gui
GUI (graphical user interface)
Import Java.awt.Button;
Import Java.awt.FlowLayout;
Import Java.awt.Frame;
Import Java.awt.event.WindowAdapter;
Import java.awt.event.WindowEvent;
/** * GUI (graphical user interface) * Graphical user Interface (graphical user interface) * Graphically, to display the interface of computer operation, so that more convenient and intuitive.
* * CLI * command line user Int
provide some meaningless parameter values at the time of invocation, for example, Dodocontact ("Ace",-1, "SH"), obviously the age of negative is meaningless, but you do not do so, to conform to Java specifications. If such code is released, the maintainer behind it will have a headache because he doesn't know what the 1 means. For such cases, it is very well suited to use the builder mode. The key point of
GUI Graphics user interface GUI
AWT Abstract Window Toolkit abstract Windows Development Package
Component Manager
Layout Manager
Event handling
Java graphics
Window Event
AWT abstracts graphical elements such as toolbars, menus, drop-down bars, input boxes, etc. Component: All graphical elements that can be displayed window:
must first call the Getcontentpane in the class JFrame to get the contents pane of the frame,The contents pane is then called by the method add to add the component to the Contents pane. For example, the example above.The contents pane delegate.1 ImportJavax.swing.JButton;2 ImportJavax.swing.JFrame;3 4 Public classFrameWithButton1extendsJFrame {5 PublicFrameWithButton1 () {6JButton button=NewJButton ("button");7Add (button);//JavaSE5 followed by8 }9 Public Static voidMain (string
I,
Construction (builder) mode structure diagram
The builder mode hides the product structure and product part construction process from the client, and separates the responsibility for directing the construction process from the responsibility of specific builder parts, achieve responsibility division and encapsulation.
The construction mode creates all parts o
I just searched for a crack. I didn't expect it to be acquired by Google and it's free of charge. okacaka
WindowBuilder Pro was originally called WindowBuilder. It was recently acquired by Google and changed to the current name. It originally required Money for commercial purposes. However, after Google's acquisition, you can use it for free. It is a very powerful and easy-to-use bidirectional Java GUI des
1.GUI (graphical user interface)Graphical user Interface (GUI).Graphically, to show the interface of computer operation, which is more convenient and more intuitive.2.CLICommand line user Interface (Shell interface)is a common DOS command-line operation.Need to remember some common commands, the operation is not intuitive.Example:For example: Create a folder, or delete a folder, etc.Java provides the
GuiGraghical user Interface (GUI)Java provides GUI for objects that exist in java.awt and java.swing packagesJava GUI does but C + + etc, do not intend to waste too much time on thisA simple form demonstrationpublic static void Main (string[] args) {frame f = new Frame ("new form"); F.setlocation (400, 200);//Set the p
I. Understand vocabulary
1. Common Words
2. java. AWT package
The Java. AWT package is a Java built-in package, which is part of the Java basic class library (jfc [Java foundation classes]) and contains the following content:
1. a rich set of interface compone
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.