Sometimes in the work, we need to use the Linux graphical user interface environment to do some operations (such as install Oracle database, etc.), then need to use Xstart remote connection Linux GUI, so we do not have to run to the engine room operation server. The prerequisite is that the Linux service to be accessed has installed the Remote Desktop environment
Modifying a file As root can be:
/etc/pam.d/gdm-password comment out "auth required pam_succeed_if.so user!= root quiet"
After the user logs on to the graphical interface, execute the following instructions at the terminal:
1.$ Su-($ su root effect is the same)
Enter root account password
2.# VI/ETC/PAM.D/GDM
E
Java GUI programming (Graphic user Interface, graphical user interface) is implemented on its Abstract Window Toolkit (abstract Windows TOOLKIT,AWT). java.awt is the AWT Tool class library, which includes rich graphics, user
The basic layout of the graph FlowLayout (flow layout) The components that are placed are automatically arranged from left to right from top to bottomBoerlayout (Border layout) is divided into the upper and lower left and right five partsGridLayout (Grid layout) input the number of rows and columns required creates a grid-like layoutBxolayout (box layout) Vertical or horizontal layout components are limited to the ' box 'Common components: JButton (Button) JLabel (note strip) Jcheckbox (tick bar
First, the layout1. ComponentsAn object that is graphically displayed on the screen, interacting with the user, is called a component.Components include: menus, labels, text boxes (password boxes), scroll bars, radio, check, buttons, and so on.2. ContainersComponents cannot be displayed independently, only the assembly can be placed in a container for normal display.Arranging and distributing components in a container in a reasonable and orderly manne
. SetValue (File.read ()) File.close ()#save函数几乎和load一样, except that it has a ' W ' attribute and the Write method.#GetValue用于从文本区获得信息Def save (Event): file = open (filename. GetValue (), ' W ') file.write (contents. GetValue ()) File.close ()
Program Listing 6: The final program
import wxdef Load (event): File = open (filename. GetValue ()) contents. SetValue (File.read ()) File.close () def Save (event): File = open (filename. GetValue (), ' W ') file.write (contents.
expect will appear after we click.Jtexxfield (text field), adding textLayout of components1,flowlayout (Flow layout)2,borderlayout (Border layout)3,gridlayout (Grid layout)4,boxlayout (Box Layout)5, free layoutThe latest Java event handling method is to generate events based on the authorization event model event source and send it to one or more listener listeners simply by waiting until it receives an event. Once the event is accepted, the listener processes the events and then returns.Event:
Week 7 Project 1-graphical user interface (GUI) initial application development experience, week 7 gui
The first time I used vc ++, I felt that the first time I had done it under the guidance of my roommates in 4408 was not very good. Today I came to the data center and made another trip.
Starting with vc ++
What it looks like after a simple operation
Cod
When developing and customizing the Android system, it often discourages a lot of source code. To search for a keyword, using the IDE to build a project takes some time, we can use this tool to easily find the source content, to find the development ideas:Specify the filename suffix, location, and other parameters of the searchSpecify Search ContentSpecify Search FieldsSpecify field valuesSpecify additional search PropertiesSave search results as HTML for future use (with browser to open the ass
650) this.width=650; "title=" desktop version now defined. png "style=" Float:none; "alt=" Wkiol1hiudxq3hblaad9igbyyxc118.png-wh_50 "src=" Http://s2.51cto.com/wyfs02/M01/8B/41/wKioL1hIudXQ3hblAAD9IgbyYxc118.png-wh_500x0-wm_3-wmp_4-s_2491205877.png "/ >650) this.width=650; "title=" installation desktops the following KDE desktop and X Window System.png "src=" http://s2.51cto.com/wyfs02/M00/8B/41 /wkiol1hiuwhs6winaae7t_kyxh4173.png-wh_500x0-wm_3-wmp_4-s_1680821208.png "alt=" WKioL1hIuwHS6wINAAE7t_
Creating a GUI program in Java requires at least three types of objects:
* Component
* Events
* Listener
Pushcounter is a startup class and only displays a button (marked as "Push me !"), Press the button to update the counter to display the latest results.
// Pushcounter. Java// Demonstrate a graphical user interface and listener
Import javax. Swing. jframe;
Pub
Namedwindow (const string winname,int flag = window_autosize)Winname: Window NameFlag: Window MarkingWindow_normal This value the user can change the size of the windowThe Window_autosize window automatically adjusts the adaptive image4, Output image to file: Imwrite functionPrototype: BOOL Imwrite (const string filename,inputarray img,const vectorFileName: File nameParams: for JPEG picture parameters, the image quality from 0 to 100 is 95 by default
use Borders, both of which are part of the Java tutorial .
For more information about these topics, see the Swing package description and Java Tutorials section of the JComponent Class.JComponentAnd its subclasses record the default values for some properties. For example, JTable the default row height is 16. Each JComponent subclass has the ComponentUI creation ComponentUI as ComponentUI part of its construction. In order to provide a special look and feel, each ComponentUI can be set bac
The default for Ubuntu is that the root user cannot log on to the graphical interface, and can only log on to other users. This is very troublesome, because the issue of permissions, can not copy delete files at will, with gedit edit files often can not save, can only use Vim to edit.
Here's an example of Ubuntu version 16.04:
1, open the terminal
2, input sud
construction Methods: Gauge (Parent,id,range=100,pos,size,style=ga_horizontal)Range refers to the value of an end point specified when the progress bar is loaded, and the program will confirm that the current progress bar should be more than full. The style specifies whether the load is loaded horizontally or vertically, and is loaded vertically ga_verticalUnlike some other components, it is not enough to construct the progress bar in the window alone, so the progress bar is static. The progres
does not provide direct support for scrolling, we simply wrap jlist into JScrollPane, which automatically helps with all the details.
Summary: JList want to add elements, you can perform static operations that add all elements to the jlist initialization, or you can use the list model Defaultlistmodel to process all of the list modification details in a dynamic operation.
Note: Update detection may be used during the JList element selection process to ensure the stability of the program.
The
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.