Eleven weeks Lessons Learned

Eleven weeks Lessons Learned

Jiugongge

experiment procedure

1, experiment code

package Work7;
import javax.swing.*;
import java.awt.*;
public class Test {

    public static void main(String[] args) {
        JFrame frame=new JFrame("九宫格");
        frame.setLayout(new GridLayout(3,3,3,3));
        Button but=null;
        for(int i=1;i<=9;i++) {
            but=new Button(""+i);
            frame.add(but);
        }
        frame.pack();
        frame.setVisible(true);

    }

}

2, the experimental results

3, experiments are summarized
`` `
squared is to use a table layout manager, just need to simply create a table layout manager on the line, fairly simple.

Lessons Learned

graphic interface

ATM



But the limitations of ATM is available only in the Windows system to

SWING

Basic container: Jframe container

1, Jframe conventional method

2, Dimension class

3, Piont class

Label assembly: JLable class


1, a common method

2, change the text style

3, set the picture

Button component: JButton class

1, the common method

Layout Manager

Five common manager
1, FlowLayout flow manager
2, BorderLayout window manager
3, GirdLayout table manager
4, CardLayout card manager
5, absolute positioning

Streaming manager FlowLayout

Common method

BorderLayout window manager

Common method

GirdLayout table manager

Common method

CardLayout card manager

Common method

Absolute positioning

Common method

Guess you like

Origin www.cnblogs.com/xzy999123/p/11816248.html