------ Solution ---------------------- ----------------------
javaSE recommended to learn the basic science through. then learn Servlet, mvc. Then learn jsp. in to learn Struts, Hibernate, Spring, ibatis framework needed to understand the most basic sql command As javaME I think it will not be necessary to learn, if you want to do mobile development words. Then you school ME, 1, we must first learn the basics of java . Do not be confused by the new technology , the so-called original aim , new technologies are based on the foundation of java , if not a solid foundation for these new technologies is also a smattering of understanding , not learn the root of two , learning to do a java project after java basics , do a java project to consolidate it, in the project you will find a lot of problems , by solving problems , deepen grasp the basics . 3 , the basics of learning and developing application software development database from the database can not grasp several popular databases : Oracle, SQL server, MySQL and so on. 4, JEE -based learning website where first base, including HTML, DHTML, JavaScript; then to learn XML, XML + JAXP; then JEE -based learning , including JEE development environment , RMI / IIOP, JNDI; finally learning applications JDBC database development . 5, web web developers to develop a comprehensive knowledge of JEE : Servlet + JSP + javaBean + TagLib, here to do a complete web application development projects.
Recommended Video: http://java.itcast.cn/java/video.shtml
------ Solution ------------------------------------ --------
the screen still do ------ Solution ----------------------------------- ---------
I also find that I want to write a book with Notepad , who tutorials ? The same question
------ Solution -------------------------------------- ------
poor foundation , it is recommended hurry up basis , do not rush to do something that may quicken the work .
------ For reference only -------------------------------------- -
I'm a bad foundation. Well, I 've learned a finished frame . Looking for some basic video projects . Want to use Notepad program to learn GUI, IO
------ For reference only ---------------------------- -----------
today I found a http://www.tudou.com/programs/view/bAsX4YzOK_k/ source code is also achieved . Oh , review the IO, GUI
import java.awt.FileDialog;
import java.awt.Frame;
import java.awt.GridLayout;
import java.awt.Menu;
import java.awt.MenuBar;
import java.awt.MenuItem;
import java.awt.TextArea;
import java.awt.datatransfer.Clipboard;
import java.awt.datatransfer.DataFlavor;
import java.awt.datatransfer.StringSelection;
import java.awt.datatransfer.Transferable;
import java.awt.datatransfer.UnsupportedFlavorException;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.DataOutputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.IOException;
import java.io.StringReader;
public class Editor extends Frame {
String filename;
TextArea tx;
Clipboard clip = getToolkit () getSystemClipboard ().;
Editor () {
setLayout (new GridLayout (1, 1));
/ /
tx = new TextArea ();
add (tx);
MenuBar mb = new MenuBar ();
Menu F = new Menu (" File" ) ;
MenuItem n = new MenuItem (" New" ) ;
MenuItem o = new MenuItem (" Open" ) ;
MenuItem s = new MenuItem (" Save" ) ;
/ / MenuItem as = new MenuItem (" Save As" ) ;
MenuItem e = new MenuItem (" Exit" ) ;
n.addActionListener (new New ());
F.add (n);
o.addActionListener (new Open ());
F.add (o);
s.addActionListener (new Save ());
F.add (s);
e.addActionListener (new Exit ());
F.add (e);
mb.add (F);
Menu E = new Menu (" Edit" ) ;
MenuItem cut = new MenuItem (" Cut" ) ;
MenuItem copy = new MenuItem (" Copy" ) ;
MenuItem paste = new MenuItem (" Paste" ) ;
cut.addActionListener (new Cut ());
E.add (cut);
copy.addActionListener (new Copy ());
E.add (copy);
paste.addActionListener (new Paste ());
E.add (paste);
mb.add (E);
setMenuBar (mb);
mylistener mylist = new mylistener ();
addWindowListener (mylist);
}
/ / inner class
class mylistener extends WindowAdapter {
public void windowClosing (WindowEvent e) {
System.exit (0);
}
}
class New implements ActionListener {
public void actionPerformed (ActionEvent e) {
tx.setText (" Enter text here " ) ;
setTitle (filename);
}
}
class Open implements ActionListener {
public void actionPerformed (ActionEvent e) {
FileDialog fd = new FileDialog (Editor.this, " select a file ", FileDialog.LOAD);
fd.show ();
if (fd.getFile ()! = null) {
filename = fd.getDirectory () + fd.getFile ();
setTitle (filename);
ReadFile ();
}
tx.requestFocus ();
}
}
void ReadFile () {
/ / read the stream into a document , remember to turn off the flow reading
BufferedReader d;
/ / StringBuffer class is lang bag is String improvements, you can read a line , replace, append ,. toString (),
StringBuffer sb = new StringBuffer ();
try {
d = new BufferedReader (new FileReader (filename));
String line;
try {
while ((line = d.readLine ())! = null)
/ / this while no braces
sb.append (line + "\ n");
/ / out of the loop
tx.setText (sb.toString ());
d.close ();
} catch (IOException e) {
/ / TODO Auto-generated catch block
e.printStackTrace ();
}
} catch (FileNotFoundException e) {
/ / TODO Auto-generated catch block
e.printStackTrace ();
}
}
class Cut implements ActionListener {
public void actionPerformed (ActionEvent e) {
String sel = tx.getSelectedText ();
StringSelection ss = new StringSelection (sel);
clip.setContents (ss, ss);
tx.replaceRange ("", tx.getSelectionStart (), tx.getSelectionEnd ());
}
}
class Copy implements ActionListener {
public void actionPerformed (ActionEvent e) {
String sel = tx.getSelectedText ();
StringSelection clipString = new StringSelection (sel);
clip.setContents (clipString, clipString);
}
}
Not clear on how to get access to the code...
回复删除dontsellmebro@gmail.com
Never-mind, wrong article, sorry.
回复删除