Today to introduce you about how to implement Notepad in Java, is a very good case of learning Java Swing, the following first look at the results of the operation (download the address below):
Here we look at the source code:
[java] View Plain copy importjava.awt.*; importjava.awt.event.*; importjava.text.*; import
First Java program--use Notepad to editAfter the last article of the Java environment to build a successful small partners can write their own Java program on their own computer yo~ has not set up the environment variables of the small partner please transfer to the previous essay to complete the building.Connection Ad
, in order to detect whether a Java file can be run. Similarly, the installation version number appears. 650) this.width=650; "title=" 16.jpg "style=" Float:none; "src=" http:/ S5.51cto.com/wyfs02/m02/84/16/wkiom1effufqve8eaadndbp8hli476.jpg-wh_500x0-wm_3-wmp_4-s_3026983649.jpg "alt=" Wkiom1effufqve8eaadndbp8hli476.jpg-wh_50 "/>
Now, we can do simple Java file compilation in
Although there are many programming software to implement Java programs, very few people will use Notepad to write, but this for beginners, this is a good way to understand how Java operation. and others do not understand, you know is not very handsome. (personal view)------------First, create a new Java file1. New
1. Installing the JDKDownload JDK 6 downloadHttp://developers.sun.com.cn/download/java_se.htmlRun Setup, follow the onscreen prompts to complete the installation of JDK 6, following the installation path:E:\Program files\java\jdk1.6.0_02Run the Command control program and execute the following command:JavacThe system prompts the following error:' Javac ' is not an internal or external command, nor is it a program or batch file that can be run.To make
1. Install JDKDownload JDK 6
Http://developers.sun.com.cn/download/java_se.html
Run the installer and follow the on-screen prompts to install JDK 6. The installation path is as follows:E:/program files/Java/jdk1.6.0 _ 02Run the "Command Controller" program and run the following command:JavacThe system prompts the following error:'Javac' is not an internal or external command, or a program or batch file that can be run.To facilitate the use of JDK tool
To write Java programs, the Java SDK is essential, Mac OS System comes with the SDK, if you feel that the version is too low, you can go to the official website to download the latest.Open the terminal and create a new Helloworld.java file:Vim Helloworld.javaStart writing programs, (for everyone to learn better, please refer to the figure of the code, to discard the pleasure of copying and pasting)Next save
notepad++ plug-in nppexec implements the console Dialog, which can complete the basic functions of the Windows console, such as the ability to compile, run in this window Java program;notepad++ is also able to run external programs, establish mappings between menu items and external programs, and support input parameters for external programs. 1. Using the Conso
First of all, let notepad++ compile and run Java, if the computer is already configured in the Java environment (here can refer to my blog about the Java environment configuration of the essay).Locate the plugin in the options bar above notepad++--->plugin Manager--->show Pl
What I want to share today is a Notepad program written in Java. I know there are all kinds of notepad on the market now, but I found that some of the functions are not perfect, or the code hierarchy is not clear enough, and some even looked after the foggy, some also have a very obvious bug, I now share this Notepad p
change the installation path of the JDK, select the options that need to be installed, and if the JRE is not installed beforehand, it is best to install it all. After installation, the program can be seen in the control Panel, Java applications, open can complete the configuration of java.Once the configuration is complete, download the editing toolFirst,Notepad (Microsoft operating system comes with) You
Today I tried to run Python and C and Java on Notepad, and Daoteng a long time to finally succeed.Running Python on 1.notepadFirst you need to install a plugin: nppexec,: https://sourceforge.net/projects/npp-plugins/files/NppExec/NppExec%20Plugin%20v0.5.3/After download, move the NppExec.dll file inside to the notepad++ plugins directory: My is: C:\Program files
Studied Java for one months. wrote a notepad. Due to the time relationship. To practice, many functions are not added, only to achieve a simple interface and the most basic functions.Later have time to perfect it.
=================================================================================* * cats and kittens. First Java program
*
*
*copyright Cat
*/
Import
See on the CSDN, because use Java to write to Notepad on the line problem, see this article, reprinted a bit. Oh.
I hope you can see it later.
Today, I did a Java file read and write, the original thought will be Java database OK, but now a look, read and write files, threads and other issues are all very important
Recently used notepad++ to write a compilation, it feels very handy, so I would like to be able to write Java and compile and run under this excellent editor, because each time you start eclipse is a long time, and eclipse is too much memory ...So after a variety of Baidu, see the online tutorial, using notepad++ nppexec (not
Introduction to JavaMaximum features---cross-platformInstallation of the Java compilation environment http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.htmlSelect the JDK download installation for Windows x64Understanding the directory structure of the JDKJava_home:c:\program files\java\jdk1.8.0_102JRE---
Reference article: http://blog.csdn.net/mdyyzc/article/details/7653096Sometimes it takes a long time to experiment with a small piece of code to open eclipse (Computer configuration is low, forgive me). So, notepad++ with plug-ins to build a Java fast-developing IDE environment you deserve.First download this article protagonist--nppexec plugin,:Http://www.softpedia.com/get/Office-tools/Text-editors/NppExec
Implement a simple Notepad by using the Java Swing, Io, to open the specified text file, then load the contents of the text file into the swing component, and then edit the Notepad contents in the Swing component. You then save the edited content to the text file with the Save option for the menu. The code is as follows:
Copy Code code as follows:
Im
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.