Today is the start of the project time, the overall is still smooth. In advance to divide the group, then the class can be helped by someone to occupy the seat, it is very good to feel.
Project development difficulty looked, because has the first time MFC development experience, so this lecture feels very has the goal, and overall relates to the database connection aspect, relative and last project to my advantage is very big. But there are some places that are not very smooth to say.
The first is the question of textbooks, today, the course of the project development process is relatively fast, and then there is no follow-up of the courseware, so in the afternoon of the experiment time feeling is not to touch the mind. Some basic knowledge is good, directly with the source code to send, I can also understand, so the direct change can be achieved, but the overall is still not out of the data directly to do all the tasks alone, this is their own future to pay much attention to the aspects.
Well, let's see what we have to say in class today.
Swing Container Components
Swing container components are functionally divided into the following categories:
Bottom containers: Jframe,japplet,jwindow and JDialog
Normal container: Jpanel,jscrollpane,jsplitpane, also called intermediate container
Special containers: Jinternalframe,jlayerpane,jrootpane and JToolBar,
A container that can play a special role
3 most commonly used containers
JFrame
JPanel
JApplet
The JFrame class is used to create swing window objects
The characteristics of the JFrame class JFrame belong to the javax.swing package
The JFrame object gets its content panel by calling the Getcontentpane () method
You cannot add components directly to the JFrame object through the Add () method, you must add the components to the contents panel of the JFrame object
You cannot set a layout directly for a JFrame object, but you should set the layout for its content panel
The default layout for the JFrame content panel is:
BorderLayout
Basic components in Swing
Component classes |
Description |
JApplet |
Subclasses of the Java.applet.Applet class |
JButton |
Buttons that can display text and graphics |
Jcheckbox |
check boxes to display text and graphics |
JCheckBoxMenuItem |
check box menu item |
JComboBox |
Combo box (text box with drop-down list) |
JComponent |
Base class for all lightweight base components |
JDesktopPane |
Desktop Container Pane |
JDialog |
The base class for the Swing dialog box |
JEditorPane |
The container pane for editing text |
JFrame |
A form derived from Java.awt.Frame |
JInternalFrame |
Internal forms that appear in JDesktopPane |
JLabel |
Labels that can display text and graphics |
JLayeredPane |
A container that can display components on different layers |
Component Class Description
JMenuBar menu bar for displaying menus
JMenu a menu displayed in the menu bar
menu items in the JMenuItem menus
Joptionpane Standard dialog box
JPanel Universal Container Panel
JPasswordField Password input box, is the JTextField extension, can make the input word masking
JPopupMenu Pop-up menu
JProgressBar progress bar
Jradiobutton radio button
JRootPane Bottom Container Pane
Jscrollbar scroll bar
JScrollPane Scrolling Pane
Jseparator Horizontal or vertical divider lines
JSlider Sliding block
First day of Java development