Diary of 2008-01-28

I thought that it stopped snowing, but it's harder than yesterday! I started to worry about my cycling plan, I got up at 8:00 and left, on the door, a man by bicycle was fall, a half of eggs in basket was broken.the broken eggs spilt all over the ground. It's very pity:(, and the same time, another one went to work was fall!. so I had to be careful in moving my foot.

Come in the office, only two colleagues were keeping on their seat. but it's 9:30 now. it's nothing to be surprised about that. A newer thought that we are start work at 10:00. the air conditioner is bad, COLD!

Afternoon, went to the Metro Centre, but I still have nothing and begin to go over the "Spring Reference", At 3:00, the staff in the Centre told us that they had a activity and must closed the door of the machine room.

When I arrived home, I was fall one after the other, Sigh!

in the evening, watch the old film named "Su Zhou River", It's said that it winned centain award. but I didn't glom onto what it's saying,
好的,我可以为您讲解Java基础案例7-3日记本。这个案例是一个简单的Java GUI应用程序,可以让用户创建、查看和编辑日记条目。以下是该程序所包含的一些主要功能: 1. 创建新的日记条目:用户可以在程序中创建新的日记条目,输入标题和内容。 2. 查看日记条目列表:程序可以显示所有已创建的日记条目的列表,用户可以通过点击列表中的条目来查看它们的详细内容。 3. 编辑日记条目:用户可以编辑现有的日记条目,包括更改标题和内容。 4. 删除日记条目:用户可以删除现有的日记条目。 下面是该程序的一些关键代码片段: ``` public class DiaryGUI extends JFrame { // ... GUI component declarations ... public DiaryGUI() { // ... GUI initialization code ... // Set up action listeners for buttons newButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { createNewEntry(); } }); viewButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { viewSelectedEntry(); } }); editButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { editSelectedEntry(); } }); deleteButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { deleteSelectedEntry(); } }); } // Method to create a new diary entry private void createNewEntry() { // ... code to prompt user for new entry title and content ... DiaryEntry newEntry = new DiaryEntry(title, content); // ... code to add new entry to list of entries ... } // Method to view a selected diary entry private void viewSelectedEntry() { // ... code to get selected entry from list ... // ... code to display selected entry in a new window ... } // Method to edit a selected diary entry private void editSelectedEntry() { // ... code to get selected entry from list ... // ... code to prompt user for new entry title and content ... selectedEntry.setTitle(title); selectedEntry.setContent(content); } // Method to delete a selected diary entry private void deleteSelectedEntry() { // ... code to get selected entry from list ... // ... code to remove selected entry from list ... } } ``` 以上是该程序的一些基本代码片段,它们提供了创建、查看、编辑和删除日记条目的功能。当然,这个程序还有很多细节可以完善,比如数据的持久化和数据的输入验证等等。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值