2015年3月27日 星期五

java 按鈕

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;

class Test
{
public static void main(String[] args)
{
JFrame jtfMainFrame=new JFrame("Which Button Demo");
jtfMainFrame.setSize(450, 150);
JButton  jbnButton1 = new JButton("Button 1");
 JPanel jplPanel = new JPanel();
jplPanel.add(jbnButton1);
jtfMainFrame.getContentPane().add(jplPanel, BorderLayout.CENTER);
jtfMainFrame.setVisible(true);


}


}

ctrl c:跳開

2015年3月12日 星期四

java


<html>
<head>
<title> The First Example: Hello, World </title>
</head>
<body>
<h2> This line is HTML </h2>

<script language="JavaScript">

<!--
document.write("Hello, World.This sentence is written using JavaScript.");
// Text on the right of 2 slashes is comment
/* This is comment
that occur more than 1 line
*/
//-->
</script>
<noscript>
Sorry, but your browser doesn't run JavaScript.
</noscript>

<h2> This line is HTML </h2>
</body>
</html>


步驟1.開啟wordpad
步驟2.貼上程式碼
步驟3.更改姓名
步驟4.儲存檔案index 選擇txt副檔名
步驟5.更改副檔名為htm

2015年3月5日 星期四

安裝java執行一個程式+這堂課對自己的期許與(三個問題)

1為什麼修這門課?
學寫程式,好找工作
2 希望在這堂課學到什麼知識(目標)?
學會java
3 我要如何修習這門課?
上課和自修
安裝JAVA

選電腦 按右鍵
進階系統設定 選環境變數
變數path編輯 變數值後加/;
貼上JAVA所在資料夾C:\Program Files (x86)\Java\jdk1.8.0_31\bin 即可