Who knows how much sand stone is consumed by the tower of Babylon in tongtian? Who knows how many days and nights Rome has been built? The only thing we know is that there is no great wall in the winding way without the building of bricks and stones. Without the accumulation of stones and clay, there will be no immutable pyramid. It can be seen that the preparation of basic knowledge is crucial for us to learn everything, so let's start from understanding some basic functions of
1. Preface:
After learning the basic syntax in Java and getting familiar with the object-oriented basics of Java, we can start simple swing program design, friends who have used VB may be attracted by its simple user interface design method. They only need to drag several controls to the form, you can simply design the interface by writing an event for each empty part. but is powerful Java no inferior to VB? You can also design exquisite interfaces.2.
Annotation: This article from the straight_talking_java@yahoogroups.com discussion group, has been more than a year ago. Alan William son is an editor of Java developers Journal. The following is a message source from him at IBM. I have seen a lot of SWT and swing debates, and there are also a lot of netbeans and eclipse. The translator's translation of this article is not a matter of dispute or support (although I did stand on the SWT side), not to
Swing APIs are designed to be powerful, flexible, and easy to use. In particular, we want programmers to easily create new swing components, whether from scratch or by extending some of the components we provide. For this purpose, swing components are not required to support multi-threaded access. Instead, we send a request to the component and execute the reque
Use UIManager in Swing to batch customize the default attributes of a single JComponent component.
Recently, I was studying Swing, and it was so angry with its complexity that I was about to change the background color of JFrame to a white background. I found that it was not as smooth as I thought, and it was totally ineffective to call setBackground, suddenly, we realized that JPanel itself had an opaque b
1. Preface:
When we have learned the basic syntax in Java, and familiar with Java object-oriented Foundation, we can start a simple swing program design, the use of VB Friends may be its simple design of the user interface method to attract, just drag a few controls to the form, Writing an event for each empty piece can be a simple interface design. But the powerful Java is no less than VB. You can also design a beautiful interface.
2.
Section 3 swing
Returned directory
The jfc (Java foundation classes), proposed at the 1997 javaone conference and released in May 1998, contains a new Java window Development Kit named swing. These new GUI components are upgraded to AWT (appreciable) and seem to be very helpful for Java to occupy the computer world. The era of Java is approaching: downloadable applets will be software in the future; people
Self-
Day line
1. Preface:
when we have learned the basic syntax in Java, and familiar with the Java Object-oriented Foundation, we can start a simple swing program design, the use of VB Friends may be its simple design user interface approach to attract, just drag a few controls to the form, Writing an event for each empty piece can be a simple interface design. But the powerful Java is no better than VB? You can also design a beautiful interfac
Five common la s of Swing and wing in java
1. Border layout (BorderLayout)
2. FlowLayout)
3. GridLayout)
4. BoxLaYout)
5. Empty layout (null)
There are two other layout S: GridBagLayout (grid package layout) and CardLayout (card layout)
Note: The default layout of JFrame and JDialog is BorderLayout, while that of JPanel and Applet is FlowLayout.
Sample Code for border layout:
Import java. awt. borderLayout; import javax.
2.2 multi-threaded Swing event processingTo improve its efficiency and reduce its complexity, all Swing components are designed to be non-thread-safe. Although this sounds scary, it simply means that all access to the Swing component needs to be completed by a single thread-the event distribution thread. If we are not sure that we are located in a specific thread
I have been paying attention to the development of javafx since July December.
Now, it's almost the fifth year. During this period, I experienced some turbulence, but javafx was still developing and had undergone many changes (this is also a feature of Java technology, it won't be like Microsoft's abandonment of technology and frequent upgrades). From the pure javafx scripting language that used to adapt to the development of rich Internet technology, it has now become a technology completely u
Before introducing the swing threading mechanism, let's introduce some background concepts.Background conceptsynchronous vs. asynchronous :synchronization is when a program starts processing an event after initiating a request, waits for the result of processing, or waits for the request to complete before the program is blocked (block) until the request is completed.asynchronous is returned immediately after the current program initiates the request,
Features of Java swing components:
1. The implementation of swing is a small GUI framework, which has no basic platform dependencies, but is dependent on AWT implementations.
2. The javax. Swing. jcomponent class is the base class of all swing components.
3. The objective of the sw
drawn. When the header is drawn, the row value is-1Column-column index of the cell to be drawn
Import COM. jtextfield. test. uppercasefield; import Java. AWT. borderlayout; import Java. AWT. color; import Java. AWT. component; import javax. swing. jframe; import javax. swing. jscrollpane; import javax. swing. jtable; import javax.
Substance look feelThe purpose of this project is to provide a popular look feel ). This appearance (look feel) combines the best features of Windows XP and MACOs 10.4 and requires JDK 5.0 and later.
More information about substance look feelJgoodies look feel jgoodies look feels make your swing applications and applets look more beautiful. The screen is as follows:
More information about jgoodies look feelThe screen of smooth metal look fe
Swing is non-thread-safe. That is to say, if multiple threads operate on a swing component at the same time, exceptions and other problems may occur.ProgramCrash. After all, repainting is a relatively time-consuming operation. If the content of a swing component is changed during the repainting process, the repainting content is inconsistent with the modified con
Applicable environment: when the user changes, other objects are notified, and other objects are changed. For example, for paging programs in swing, When you click the next page on the previous page, you need to re-activate the event and obtain new data from the database.
In Swing event processing, if multithreading is not used, the main interface is blocked, that is, the interface is white, when multithrea
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.