Windows are the basis of GUI programming, the visual components of applications that are small applications or graphical interfaces are placed in Windows, and in the GUI, Windows are part of the user's screen and act as a small screen in the screen. The following three types of Windows are available:
Applet window: The Applet class manages this window, which is created and processed by the system when the application program starts;
frame window (
Windows are the basis of GUI programming, the visual components of applications that are small applications or graphical interfaces are placed in Windows, and in the GUI, Windows are part of the user's screen and act as a small screen in the screen. The following three types of Windows are available:
Applet window: The Applet class manages this window, which is created and processed by the system when the application program starts;
frame window (
Http://www.java3z.com/cwbwebhome/article/article2/2359.html
In the past j2se versions, components cannot be directly added to the top-level swing containers. These containers include: jframe, jdialog, jwindow, japplet, and jinternalframe. for example, a jframe instance is named aframe. We need to add a component named acomponent (such as a jpanel) to jfra
related to the swing Text Component
Javax.swing.text.html |
Javax.swing.text.html. parser |
Javax. Swing. Text. rtf |
----------------------------------------------
Javax. Swing. Tree | class designed for the swing tree component (jtree)
Javax. Swing. Undo | provides the swing Text Component Redo or undo functions.
1-2: Swing Layout
Almost all components in swing are derived from jcomponent. That is to say, all these components are lightweight component, all written by pure Java c
first, the implementation of the interface steps1, divided into 2 ways:1) inherit a top-level container class;2) JFrame as a property of the class.2, in the construction method inside, the design interface3. Create Interface classThe design interface inherits the JFrame class and can directly use its methods and properties public class Firstjframe extends Jframe{
You need to add images or background images to the container in Java swing.
Provides two simple solutions, one using jpanel and the other using jlabel.
1. jpanel (source code)
Package Oo; import Java. AWT. graphics; import Java. AWT. image; import Java. io. file; import javax. swing. imageicon; import javax. swing. jframe; import javax. swing. jpanel; public class drawing {jframe = new
Windows are the foundation of GUI programming, and the visual components of applications with small applications or graphical interfaces are placed in Windows, and in the GUI, Windows are part of the user's screen, playing a small screen in the screen. There are three types of windows:Applet window: The Applet class manages this window and is created and processed by the system when the application program is started;frame window (JFrame): This is the
Many times we need to export the java program into an executable jar package, but we often encounter a problem: the external resource fragments referenced in the program become invalid in the executable jar package. I also encountered this problem myself. I checked some information on the Internet, but it was not easy to understand. After a little research, I solved this problem and recorded it here. Taking a simple program as an example, we place an image in a
Recently summed up the relationship between Paint,repaint and Updata in java, first we all know to use the Paint method to draw, with repaint redraw, with update to write double buffering. But how do they call each other, let's analyze (to see the results directly, skip the analysis process):--------------------------------------------------------------------------------------------------------------- --------------1. First of all, let's draw on Jframe.Import java.awt.Color;Import java.awt.Graph
:
JTextField
When dealing with JTextField, you just need to focus on one method-which should be obvious-this is the way to set the text: Get/settext (), to get/set the text in JTextField. JFrame
So far, I've introduced three basic building blocks of Swing: Labels, buttons, and text fields, but now you need a place to put them, and you want users to know how to handle them. The JFrame class does this-it's a
In the last section we talked about the concept of GUI (graphical User Interface) and learned that GUI programming is mainly about two packages, namely: AWT and Swing, this section we will implement the first window through the classes and controls commonly used in swing programs.Javax.swing.JFrameJFrame is a Window object in the GUI that inherits from frame. The JFrame control is used to create a form in a swing program. As shown in table 1, the comm
Java Interface Programming (1), java Interface Programming
This article is my learning notes, welcome to reprint, but please note the Source: http://blog.csdn.net/jesson20121020
I recently want to learn java interface programming, which is recorded here.
Most Swing applications are built inside the basic JFrame, and JFrame can create Windows applications in any operating system you are working on.
See the f
Java GUI makes a simple management system and javagui Management System
The examples in this article share the specific code of the Java GUI Management System for your reference. The specific content is as follows:
1. Complete MainUI on the home page first (the Code is as follows)
Package com. pag_1; import javax. swing. *; import java. awt. *; import java. awt. event. actionEvent; import java. awt. event. actionListener; public class MainUI extends JFrame
Windows are the basis of GUI programming, the visual components of applications that are small applications or graphical interfaces are placed in Windows, and in the GUI, Windows are part of the user's screen and act as a small screen in the screen. The following three types of Windows are available:①applet window② frame window (JFrame)③ a borderless window (JWindow)The object created with the JFrame class
Java implements the student management system based on MySQL and the mysql student management system
This article shares with you the Java student management system based on MySQL for your reference. The specific content is as follows:
Because the lab had to hand in homework and then built a student management system, and pasted a code to commemorate it, the interface was too urgent and something worse.
Some small details are incomplete, but the main functions can still be implemented.
Window i
BorderLayout
FlowLayout
GridLayout
GridBagLayout
CardLayout
BoxLayout
1.BorderLayoutJava.lang.Object--java.awt.borderlayoutDivides the layout into east, west, south, north, and five regions, placing the joined components at the specified location.
Borderlayout.east
Borderlayout.west
Borderlayout.south
Borderlayout.north
Borderlayout.center
constructor function:BorderLayout ()Create BorderLayout with no spacing between componentsBorderLayout
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.