作业帮 > 体裁作文 > 教育资讯

电子日记本

来源:学生作业帮助网 编辑:作业帮 时间:2024/09/24 01:24:26 体裁作文
电子日记本体裁作文

篇一:WORD版的电子日记本

我走过的日子,有你相伴的阳光 太阳遇上月亮,就是我遇见你的时候光阴荏苒 记忆永恒元旦启用[键入文字]

[选取日 期]日期天气心情1

篇二:java电子日记本代码及运行结果

// 程序主类

public class Diary {

public static void main(String args[]) throws Exception

{

new LoginWindow();

Remember win=new Remember();

win.pack();

}

}

import javax.swing.*;

import javax.swing.tree.*;

import java.awt.*;

import java.awt.event.*;

import javax.swing.event.*;

import java.io.*;

import java.util.*;

// 日记本类

class Remember extends JFrame implements TreeSelectionListener,ActionListener

{

private static final String DiaryRoot = null;

JTree tree=null;

int i=0,r=255,g=255,b=255;

JTextArea text=new JTextArea(" ",20,50);

DefaultMutableTreeNode root;

DefaultMutableTreeNode

DefaultMutableTreeNode[13];

JButton b_save=new JButton("保存"),

b_fontCommen=new JButton("还原"),

b_fontBig=new JButton("大字"),

b_fontRed=new JButton("红色"),

b_fontBlue=new JButton("蓝色"),

b_bg=new JButton("背景");

Remember()

{

Container con=getContentPane();

DefaultMutableTreeNode root=new DefaultMutableTreeNode("日记本");

//设置以月份为节点的树

for(i=1;i<=12;i++) month[]=new

{

month[i]=new DefaultMutableTreeNode(""+i+"月"); root.add(month[i]);

}

//设置不同月份的节点

for(i=1;i<=12;i++)

{

//处理有31天的月份

if(i==1||i==3||i==5||i==7||i==8||i==10||i==12) {

for(int j=1;j<=31;j++){

String s1=month[i].toString();

String s2=j+"日.txt";

File file=new File(DiaryRoot+s1+s2); //如果这一天写了日记则相应节点后面添加一个“*”来标志

if(file.exists()==true) month[i].add(new DefaultMutableTreeNode(j+"日*"));

else month[i].add(new DefaultMutableTreeNode(j+"日"));

}

}

//处理有30天的月份

else if(i==4||i==6||i==9||i==11)

{

for(int j=1;j<=30;j++){

String s1=month[i].toString();

String s2=j+"日.txt"; File file=new File(DiaryRoot+s1+s2); //如果这一天写了日记则相应节点后面添加一个“*”来标志

month[i].add(new

month[i].add(new if(file.exists()==true) DefaultMutableTreeNode(j+"日*")); else

DefaultMutableTreeNode(j+"日"));

}

}

//处理有28天的月份

else

{

for(int j=1;j<=28;j++) {

String s1=month[i].toString();

String s2=j+"日.txt";

File file=new File(DiaryRoot+s1+s2);

//如果这一天写了日记则相应节点后面添加一个“*”来标志

if(file.exists()==true) month[i].add(new DefaultMutableTreeNode(j+"日*"));

else month[i].add(new DefaultMutableTreeNode(j+"日"));

}

}

}

//设置监听

b_save.addActionListener(this);

b_fontRed.addActionListener(this);

b_fontCommen.addActionListener(this);

b_fontBig.addActionListener(this);

b_fontBlue.addActionListener(this);

b_bg.addActionListener(this);

//创建树及其面板 tree =new JTree(root);

JPanel p=new JPanel();

//设置边界布局

p.setLayout(new BorderLayout());

JScrollPane scrollpane_1=new JScrollPane(text);

//带滚动条的面板放置到中间,可以占据最大空间位置

p.add(scrollpane_1,BorderLayout.CENTER);

//设置面板,放置"保存"和"删除"按钮等按钮,面板放在上部

JPanel p_1=new JPanel();

p_1.add(b_save);

p_1.add(b_fontCommen);

p_1.add(b_fontBig);

p_1.add(b_fontRed);

p_1.add(b_fontBlue);

p_1.add(b_bg);

//设置布局

p.add(p_1,BorderLayout.NORTH);

JScrollPane scrollpane_2=new JScrollPane(tree);

JSplitPane splitpane=new JSplitPane(JSplitPane.HORIZONTAL_SPLIT,true,scrollpane_2,p); tree.addTreeSelectionListener(this);

con.add(splitpane);

//设置窗体适配器,关闭功能

addWindowListener(new WindowAdapter() {

public void windowClosing(WindowEvent e) {

System.exit(0);

} });

setVisible(true);

setBounds(200,150,500,600);

}

//处理树节点事件

public void valueChanged(TreeSelectionEvent e)

{

//清空文本区中的内容

text.setText(" ");

if(e.getSource()==tree)

{

//定义被选中的节点

DefaultMutableTreeNode node=

(DefaultMutableTreeNode)tree.getLastSelectedPathComponent(); //如果是叶节点,则可以对文件进行操作

if(node.isLeaf())

{

//日记以“-月-日.txt”的形式存储,所以要消除“*”号的影响

String str=node.toString();

str=str.substring(0,str.length()-1);

for(int i=0;i<=12;i++)

{

if(node.getParent()==month[i])

{

try {

String temp=null;

//打开以节点(“*”号影响已经消除)所定义的文本为文件名的文件

File

File(DiaryRoot+node.getParent().toString()+str+".txt"); f=new

//建立文本文件输入流,读取文件

FileReader file=new FileReader(f);

BufferedReader

BufferedReader(file);

//将读到的文件内容添加到文本区中,按行读入

while((temp=in.readLine())!=null)

text.append(temp+'\n');

file.close();

in.close(); in=new

}

catch(FileNotFoundException e1){ } catch(IOException e1){ }

}

}

}

}

}

//处理按钮事件

public void actionPerformed(ActionEvent e)

{

//处理"保存"按钮的事件

if(e.getSource()==b_save)

{

DefaultMutableTreeNode node=

(DefaultMutableTreeNode)tree.getLastSelectedPathComponent(); String str=node.toString();

//保存文件时去除“*”号的影响 str=str.replace("*","");

//如果是叶节点,则可以对文件进行操作

if(node.isLeaf())

{

//保存文件

try{

//建立以节点所定义的文本为文件名的文件

File

File(DiaryRoot+node.getParent().toString()+str+".txt");

//建立文本文件输出流 f=new

FileWriter tofile=new FileWriter(f);

BufferedWriter out=new BufferedWriter(tofile);

//将文本区中的内容写到文件缓冲区

out.write(text.getText(),0,(text.getText()).length());

//将缓冲区中的内容写到文件

out.flush();

tofile.close();

out.close();

}

catch(FileNotFoundException e1){ }

catch(IOException e1){ }

}

篇三:eDiary电子日记本 3.3 下载:增加图片对齐功能等 - eDiary电子日记本,eDiary,电子日记本

eDiary电子日记本 3.3 下载:增加图片对齐功能等 - eDiary电子日记本,eDiary,电子日记本 : EDiary electron diary this 3.3 download: Increase a picture to wait for the conceal that passes period of time to neat function, the history is long also be home’s best electron diary this software EDiary is given off again update, the action of EDiary depends on keeping a diary not just, you also can remember running water account book with it, write workaday will, the record studies a result, perhaps manage your daily documentation with it. EDiary gives priority to a line with time, it is carrier with the character, record your heart road course. EDiary electron diary this main characteristic: 1. The interface is simple and pure and fresh, support skin switch; 2. Firm data adds close mechanism, protect user privacy adequately; 3. Powerful editor function, editor experience and Word are consistent; 4. Support function of diary pattern plate, and beforehand buy is commonly used pattern plate; 5. Simple and reasonable documentation governs a function, comb daily news for you; 6. Every diary this correspondence an alone data file, diary of electron of clean and simple EDiary this 3.2 newer content: Add newly: Increased a picture to mix a function to Qi Hetu article (the dot after right key clicks a picture in the editor “ image attribute “ ) ; Add newly: Increased statistical graph (open “ tool “ in menu “ statistic “ , nod again “ chart “ ) ; Add newly: Bolt by TAB in casing of caption editor text focal fixed position arrives in the editor; Add newly: For the first time use user increases entry interface build a diary to hint originally; Add newly: The editor increased mouse Zun Jian the 3 functions that hit pitch on stage; Amend: Corrected the problem that gets weather automatically to bring about memory to visit newspaper fault sometimes; Amend: Amended the if press Alt+ to control key to be able to bring about current diary sometimes,loses issue when keeping new diary; Amend: Corrected the problem that cannot end a search by ESC key; Amend: Amended the BUG that derives the fault often signs up for when be onefold file; Adjust: Repair folder icon the color with markedder instead; Optimize: Accelerated greatly derive the speed that is onefold file; Optimize: Optimized software detail a certain number of; Support runs an environment: This 3.3 installation edition downloads diary of Windows XP/Vista/Win7/Win8eDiary electron: (3.72MB) this 3.3 green edition downloads EDiary electron diary: (5.13MB) the home that more office software welcomes to click IT -- office software channel shares:

篇四:电子日记我来做

电子日记我来做

----为MM解忧之一

关键字:页面设置,字体设置,页眉和页脚,对象格式设定

认识的MM都喜欢写日记。现在电脑已经成为家庭必备的设备,使用电脑写日记已经逐渐成为一种潮流。而在网上各种的电子日记软件也很多。让各位MM都不知道如何选择才好。还有的是大部分的电子日记软件都是共享软件,使用一段时间后就要付费才能够继续使用。如何能够找到一款既免费又外形美观的电子日记软件就让各位MM大伤脑筋。

只要我们动动脑筋,在我们身边就有这么好的软件。今天就让我们利用免费的wps个人版打造属于自己的电子日记本吧!wps office个人版的下载地址:http://wps.kingsoft.com。

一、设定日记纸张格式

通过【菜单】-【文件】-【页面设置】,打开页面设置对话框。

设定适合自己的纸张大小和页边距,以及每一页的行数。(如图1所示)

这样可以让日记的文字更好看。

然后打开【菜单】-【格式】-【字体】,在字体对话框中设置日

记使用的中文字体和英文字体的类型以及相应的字号。一般情况,为

了自己的日记能够更好看,字号建议设置最小为四号以上。至于字体

类型可以选择一种手写字体,让日记看起来更像真实手写的效果。 图1

二、让日记变得更美丽

商店中的日记簿都会插有不少美丽的图案在各页上,看起来更美

丽更有女性的味道。现在我们也来把这个电子日记进行美化,让MM

更喜欢吧!

为了预防在书写日记过程中不小心移动了图片影响了美观。我们通过在页眉页脚中插入图片的方式避免在书写日记过程中不小心造成的跑版现象。通过【菜单】-【页眉和页脚】,为文档增加页眉。然后通过【菜单】-【插入】-【图片】-【来自文件】把所需要的图片插入到文档中,然后右击对象选择【设置对象格式】,在【版式】中选择【四周型】,点击【高级】按钮,在【文字环绕】中选择【只在右侧】。点击【确定】按钮,同时把图片移动到文档的左侧。这样,日记的文字就只会在页的右侧出现而不会跑到左边去。(如图2)

2

完成这些设置工作后,我们可以点击工具栏中【页

眉和页脚】工具条上的【关闭】按钮退出页眉和页脚的

编辑状态。(如图3) 图3

接下来,我们要做的是制作日记本中的行线。这个相对操作就简单很多。只要我们选择【菜单】-【视图】-【网格线】就可以实现。在开头的时候我们已经设计好文档的字号大小以及选择了文字对齐网格线。这样,我们输入文字的时候文字就会自动根据网格线的位置进行调整。

最后在页的开关位置增加日期、天气、心情标题。这样我们的日记模板就基本完成了。

三、为日记增加一把安全锁

每个人的日记都会有私隐不希望别人随便就可以看到。因

此,为自己的日记增加一个安全锁是不能忘记的事情。选择【菜

单】-【文件加密】调出设定密码的对话框,在上而分别输入

打开文档的密码与修改文档的密码(提醒:密码的长度不能太

短,两个密码最好不要相同)。按【确定】按钮后就为自己的日

记加上了安全保障。(如图4)

图4

篇五:我的第一篇日记

我的第一篇日记"

2012/5/30

哈哈

今天刚刚发现其实每天写一篇日记还是挺有意义的嘛

每天坚持写一篇日记,不要总是等到难过了才想起来要把它写到日记里,要不然 等到那天翻开日记哪里看到的想到的只有悲伤啦。。。。

嘿嘿 虽然我的饿想象力不是吗么丰富,,,不过呢 我有个好习惯,那就是————我认为“美”的有价值的东西会把它好好加以利用,就比如说今天这个“电子日记本”啊 这是从 无敌 哪里学来的哦 嘿嘿

现在是15点30分我正在听江美琪的《亲爱的你怎么不在我身边》 这是今天突然想起的一首很熟悉的歌 有点点的伤感吧 不过还是挺喜欢这类型的 。。很喜欢里面的这句“电话再甜美 传真再安慰

也不足以应付不能拥抱你的遥远” 啊 , 我是想找个对象呢吧 ? 呵呵 …… 是呀,我的心里住着一个人 ,想到他总会抚平我那颗对象的女孩的羡慕的心,而且每当自己想要找个对象时。我会安慰自己我心里已经住着一个“你”#^_^#

好吧,,今天心情还好啦 先到这里吧^_^"

(转载于:www.smhaida.com 海 达 范 文网:电子日记本)

张雪 要坚持哦!

体裁作文