Topic: 出来乍到,请问怎么样把代码放到黑板中

  Print this page

1.出来乍到,请问怎么样把代码放到黑板中 Copy to clipboard
Posted by: micsolaris
Posted on: 2008-09-12 01:06

我见这论坛中很多人发的代码都放都黑板中,请问要怎么做才可以啊

2.Re:出来乍到,请问怎么样把代码放到黑板中 [Re: micsolaris] Copy to clipboard
Posted by: JiafanZhou
Posted on: 2008-09-12 16:18

Have a look at the "Jute标记", makes text nonproportional with fixed-width font

3.Re:出来乍到,请问怎么样把代码放到黑板中 [Re: micsolaris] Copy to clipboard
Posted by: xuxiaolei
Posted on: 2008-09-12 16:20

快速回复下面不是有个Jute标记吗,点击,会出来一个窗口,复制code标签,然后让你的代码替换code标签中的text就可以了

4.Re:出来乍到,请问怎么样把代码放到黑板中 [Re: micsolaris] Copy to clipboard
Posted by: jancyu2008
Posted on: 2008-09-15 00:11

[code]标签里面放你要放的东西

5.Re:出来乍到,请问怎么样把代码放到黑板中 [Re: micsolaris] Copy to clipboard
Posted by: micsolaris
Posted on: 2008-09-15 02:28

谢谢各位热心的朋友

6.Re:出来乍到,请问怎么样把代码放到黑板中 [Re: micsolaris] Copy to clipboard
Posted by: shingoyj
Posted on: 2008-10-29 13:16

import java.awt.BorderLayout;
import java.awt.Container;
import java.util.Date;
import javax.swing.JButton;
import javax.swing.JFrame;

class MyFrame extends JFrame {
JButton timeButton;

public MyFrame() {
setSize(400, 200);
setEnabled(true);
setTitle("时间表");
Container container = getContentPane();
timeButton = new JButton();
container.add(timeButton, BorderLayout.CENTER);
setVisible(true);

String timeStr;
String year;
String month;
String day;
String hour;
String minute;
String second;
while (true) {
try {
Thread.sleep(1000);
} catch (InterruptedException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
Date date = new Date();
year = String.valueOf(date.getYear() + 1900);
month = String.valueOf(date.getMonth() + 1);
day = String.valueOf(date.getDate());
hour = String.valueOf(date.getHours());
minute = String.valueOf(date.getMinutes());
second = String.valueOf(date.getSeconds());
timeStr = "现在时刻是:" + year + "年" + month + "月" + day + "日" + " "
+ hour + "时" + minute + "分" + second + "秒";
timeButton.setText(timeStr);
}
}
}

public class TimeTest {
public static void main(String[] args) {
MyFrame myFrame = new MyFrame();
myFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
}


   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923