公告版位
需要找什麼嗎? 左邊分類或許可以幫助你...
import javafx.application.Application;
import javafx.event.ActionEvent;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
 
public class JavaApplication1 extends Application {
 
    public static void main(String [] args) {

黃彥霖 發表在 痞客邦 留言(0) 人氣()

方法一:

Calendar cal = Calendar.getInstance();
cal.setTime(new Date());
int year = cal.get(Calendar.YEAR);
int month = cal.get(Calendar.MONTH) +1;
int day = cal.get(Calendar.DAY_OF_MONTH);
System.out.println(year + "-" + month + "-" + day);

// 為什麼 MONTH 要 +1 請參考:http://openhome.cc/Gossip/JavaGossip-V2/UseCalendar.htm

黃彥霖 發表在 痞客邦 留言(0) 人氣()

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.URL;


public static String getIp() throws Exception {
        URL whatismyip = new URL("http://checkip.amazonaws.com");
        BufferedReader in = null;
        try {
            in = new BufferedReader(new InputStreamReader(

黃彥霖 發表在 痞客邦 留言(0) 人氣()

訊息  

JOptionPane.showMessageDialog(null, "Hello");




黃彥霖 發表在 痞客邦 留言(0) 人氣()

這個範例我是採用上傳圖片(至少看的到),當然其他檔案格式也都可以上傳

執行結果:

27.105.20.1238888index.html - Google Chrome    

index.html ------------------------

<html>
<body>

黃彥霖 發表在 痞客邦 留言(0) 人氣()