Abstract:Although JAVA does not allow multiple inheritance, it is allowed to be used in some cases. This article describes how to simulate multiple inheritance in a web application.
In general development, Java's single inheritance restrictions generally do not cause any problems. In fact, the use of multiple inheritance often implies poor design. However, there are still some situations where programmers want to inherit multiple classes. Although JAVA does not allow inheritance of multiple clas
Table 1. SWT vs. AWT and Swing Feature comparison
Function/Role/Aspect
AWT
Swing
SWT (style)
Display static text
Label
JLabel
Label, CLabel
Display multi-line static text
Multiple Labels
Multiple JLabels or JLabel with HTML content
Multiple Labels or Label with newlines
Display multi-line formatted static text
Multiple Labels with different fonts
JLabel with HTML content
Multiple Labels with different fonts
Single-
good understanding of swing. I believe many students are learning about it. Most of the university teachers who have come from JDK 1.1 and 1.2 may be the least familiar with it.Swing provides a set of light components collectively referred to as jcomponent. The biggest difference between them and AWT components is that jcomponent is all container, which is characterized by the ability to load other components. Any other components can be loaded in swing components, such as jbutton, jlabel, jpan
text field jtextfield, common jtextarea listeners documentlistener, plaindocument4) rolling Panel (jscrollpane ).5) The jtextpane control supports multiple editing operations without any effort.6) check box (jcheckbox), single-choice button (jradiobutton), combo box (jcombobox), and list box (jlist)Page Panel (jtabbedpane), message box (joptionpane. showmessagedialog ),Menu (related classes, jmemu, jmenuitem, jcheckboxmenuitem, jradiobuttonmenuitem)P
, JLayeredPane, JList, JMenuBar, Joptionpane,jpanel,JPopupMenu, JProgressBar, JRootPane, Jscrollbar, JScrollPane, Jseparator, JSlider, JSpinner, JSplitPane, JTabbedPane, JTable, Jtableheader, JTextComponent, JToolBar, JToolTip, JTree,
JViewport
There are two main types of swing containers, the window and Panel,window windows are divided into two types: JFrame (Form) and JDialog (dialog), the Panel panel has two types: JPane
Reprint: http://blog.csdn.net/chosen0ne/article/details/4453267Swing components are divided into two types based on the type of data they manipulate, a component of a scalar data type, and a class of components of a composite data type. A component of a scalar data type operates on basic types of data, such as strings, Booleans, numbers, and so on, including JTextField, Jcheckbox, JLabel, JButton, and so on. Components of a composite data type operate on data such as vectors, matrices, and non-l
So far we have been in touch with the Java command line, but in order for the user to use, there must be a graphical interface, so this chapter is mainly about how to use the GUI (graphical user interface)Create a gui:javax.swing.*the layout-related content in this chapter is the content of the javax.swing package, the common components are jframe,jbutton,jradiobutton,jcheckbox,jlabel,jlist,jscrollpane,jslider,jtextarea,j Textfield,jtable, etc.Create
1. The original AWT component is from Java. AWT packages, while the AWT components of the Java application are displayed differently on different platform interfaces. But with applications developed on different platforms using swing, the same GUI interface can be used.2.SWing components are often referred to as lightweight, and are written entirely in the Java language.JButton buttonJcheckbox check box buttonJcombox drop-down list boxJFrame Framework ClassJDialog Version dialog boxJLabel Label
There is a problem with spark SQL 1.2.x:When we try to access multiple parquet files in a query, if the field names and types in these parquet files are exactly the same, except for the order of the fields, for example, a file is name string, id int, and the other file is ID int, name String, the query will error, throwing an exception to the metadata merge.In 1.3, this problem has actually been solved. Then the solution in 1.2.x is:In the Spark source Sql/core/src/main/scala/org/apache/spark/sq
the Runnable interface1 Public classtestthread{2 Public Static voidMain (string[] args) {3Mythread MT =NewMythread ();4Thread T =NewThread (MT);//Create a user thread5T.start ();//start the user thread6 }7 }8 classMythreadImplementsrunnable{9 Public voidrun () {Ten One } A}IX: AWT and Swing componentsCommon components: JButton (Button), JTextField (text box), Jcheckbox (check box), Jradiobutton (radio button Buttonground.add (JRB) ~ ~ ~),
Swing components are grouped by function and can be divided into the following categories:? Top-level containers: JFrame, JApplet, JDialog and JWindow? Intermediate containers: JPanel, JScrollPane, JSplitPane, JToolBar? Special containers: intermediate containers that have special effects on the user interface, such as: JInternalFrame, JRootPane, JLayeredPane, and Jdestoppane? Basic components: JButton, JComboBox, JList, JMenu, JSlider? Display compon
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.