Java 记事本代码
| [日期:2011-11-05] |
来源:Linux社区
作者:afgasdg |
[字体:大 中 小]
|
- import Java.awt.*;
-
-
-
-
-
-
-
-
- class FormateClass extends Frame
- {
- NoteBookFrame notebookframe = null;
- FontFrame font =null ;
- Toolkit tool = null;
- Dimension dim = null;
- boolean ran = true;
- int n ;
- FormateClass(NoteBookFrame p)
- {
- notebookframe = p;
- tool = getToolkit();
- dim = tool.getScreenSize();
- font = new FontFrame(notebookframe);
- }
- public void Rand()
- {
-
- if(ran)
- {
- notebookframe.textarea.setColumns(1);
- System.out.println(notebookframe.getWidth());
- notebookframe.Rand.setLabel("√自动换行");
- ran = false;
- }
-
-
-
- else
- {
- notebookframe.textarea.setColumns(4);
- System.out.println(dim.width);
- ran = true;
- notebookframe.Rand.setLabel("自动换行");
- }
- }
- public void FontSize()
- {
-
- font.setVisible(true);
- }
-
- }

评论声明
- 尊重网上道德,遵守中华人民共和国的各项有关法律法规
- 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
- 本站管理人员有权保留或删除其管辖留言中的任意内容
- 本站有权在网站内转载或引用您的评论
- 参与本评论即表明您已经阅读并接受上述条款
|
|
|
|