JAVA Simple text editor example - Swing API

preview_player
Показать описание
I continue my study of Java Swing API. This time I just wanted to share this very basic plain text editor. The components we need is ScrollPane, TextArea, Menu and FileChooser. On the code side - basic constructor, some Abstract actions and few methods to make this editor work. We also going to set a file extension filter so we don`t accidentally open something that would crash our application.
=====================================
SUBSCRIBE FOR MORE:
=====================================
Рекомендации по теме
Комментарии
Автор

Awesome tutorial, I have been looking for good tutorials and your's is better then all of the bigger code tutorial people on youtube

elilichtblau
Автор

Thank you, this is very easy to understand and follow. It's also pretty easy to modify it according to what my assignments need me to do.

fuzisionng
Автор

I had a problem running the program after compilation. I use Ubuntu and in the terminal when I type "java Editor" I get
"Error: Could not find or load main class Editor
Caused by: editor/Editor (wrong name: Editor) "


I see there is four class files after compiled "Editor.class", "Editor$1", "Editor$2" and "Editor$3"


Any help is appreciated. Enjoyed the video thank you!

justcloudi
Автор

I have a question: shouldn't there be a type mismatch on line 47:

Action open = new AbstractAction("Open File"){

since Action conflicts with AbstractAction?

AlbonWu
Автор

Great tutorial! It help me so much, thanks

ariyaircastro
Автор

please can you show us how we can put in this code an action like search a word in this text area and set her line ?
tnks for everything .

lyricsmusic
Автор

which software you used in this you written in java language

immyjackson
Автор

Sir are we using a framework or pure java

bhaibhaigamers
Автор

No explanation. TOTAL WASTE OF TIME!!!

osjaystorm
welcome to shbcf.ru