java ÈçºÎ´ò¿ª´ø²ÎÊýÁ´½Ó
ÔÙÓдúÂëÔÚJEditorPaneÖдò¿ªÀàËÆwww.baidu.comµÄ³¬Á´½ÓÊÇ£¬ÔËÐÐûÓÐÎÊÌ⣬µ±»»³É´ø²ÎÊýµÄ³¬Á´½Óʱ£¬¾Í»áÌáʾ·¾¶²»´æÔÚ¡£¸Ð¾õ´¦ÀíµÄʱºòûÓаÑÕû¸öÁ´½Óµ±³É´ø²ÎÊýÁ´½Ó´¦Àí¡£¼±Çó´ïÈËÖ¸µã¡£
ÏÖÓдúÂëÈçÏ£º
import javax.swing.JEditorPane;
import javax.swing.JFrame;
import javax.swing.event.HyperlinkEvent;
import javax.swing.event.HyperlinkListener;
public class Hyperlink extends JFrame {
public Hyperlink(){
JEditorPane jEditorPane = new JEditorPane();
jEditorPane.setEditable(false);
jEditorPane.setContentType("text/html");
jEditorPane.setText(" <html> <body> <a href=http://\"http://www.baidu.com/s?wd=ÀîÓî´º\">baidu </a> </body> </html>");
jEditorPane.addHyperlinkListener(new HyperlinkListener() {
public void hyperlinkUpdate(HyperlinkEvent e) {
if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {
try {
String command = "explorer.exe "
+ e.getURL().toString();
Runtime.getRuntime().exec(command);
} catch (Exception ex) {
ex.printStackTrace();
System.err.println("connection error");
}
}
Ïà¹ØÎÊ´ð£º
ÎÊÌâÃèÊö£ºÐ´ÈÕÖ¾¹¦ÄÜ£¬Ð´ºÃµÄдÈÕÖ¾·þÎñ£¬ÆäËûÓû§Í¨¹ýhttpµ÷Ó÷þÎñ£¬´«Èë²ÎÊý£¬È»ºó¼Ç¼ÈÕÖ¾£¬
ÎҵķþÎñ¸ÃÔõôд£¬ ±ðÈËÔõôͨ¹ýhttpµ÷ÓÃÎҵķþÎñ£¬ÎÒÓÃwebserviceдºÃÁËÒ»¸ö£¬¿ÉÊDz¢·¢ÓÐÉÏÏߣ¬Ïë¸ÄÓ ......
private static final String URL = "jdbc:oracle:thin:@localhost:1521:orcl";
private static final String USERNAME = "sys";
private static final String PASSWORD = "s ......
Ïë×öÒ»¸öjspµÄµç×ÓÉÌÎñÍøÕ¾£¬ÏëÕÒһЩԴ´úÂ룬ÇëÎÊÄǸöÍøÕ¾ÓкõÄ×ÊÔ´¡£Ð»Ð»£¡
ËÑË÷Ï塃 ¿ªÔ´µÄÒ²ÓÐ
csdn¾ÍÓÐÏàËÆµÄÔ´Â룬¥Ö÷ËÑÒ»ÏÂ
java ¿ªÔ´´óÈ«
¸ÄÄ£°åºÃÂ鷳Ŷ£¬»¹²»Èç×Ô¼ºÐ´¸öÁËÄØ
jf
¶¥Ò» ......
ÔõôÔÚ¿ØÖÆÌ¨ÖÐÊäÈëÀàËÆÏÂÃæµÄÐÅÏ¢£º
s1234 50
s1235 80
s1234 90
s1234 40
s1236 90
ÿµ±»Ø³µÊ± ......
¸÷·´óÏÀ¸ø¸ö˼·£¬²»ÊÇÔÚÏßµÄÄÇÖÖ£¬¾ÍÊÇÒ»¸ö×öÆÕͨµÄÓ¦ÓóÌÐò¡£
´Ê¿âÔõôÉú³ÉÄØ£¿
²»»á¡£
ÒýÓÃ
´Ê¿âÔõôÉú³ÉÄØ£¿
ÕÒ±¾×Öµä
ÒýÓÃ
´Ê¿âÔõôÉú³ÉÄØ£¿
Êý¾Ý¿â ºÇºÇ
ÓÃmap ¼üÖµ¶ÔÓ¦
Èç¹ûÓÃÊý¾Ý¿ ......