⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fontdialog.java

📁 ALGAE是一个快速创建算法演示的框架。目前支持的算法实现语言包括java和c
💻 JAVA
字号:
package edu.odu.cs.zeil.AlgAE.Client;import java.awt.*;import java.awt.event.ActionEvent;import java.awt.event.ActionListener;import edu.odu.cs.zeil.AlgAE.Client.FontSizeWidget;public class FontDialog extends Dialog   implements ActionListener{  private int oldFontSize;  private int fontSize;  private FontSizeWidget fontWidget;  private Button ok;  private Button cancel;        FontDialog  (Frame theParent, int theOldFontSize)  {    super (theParent, "Font Size", true);    fontSize = oldFontSize = theOldFontSize;    fontWidget = new FontSizeWidget (fontSize, this);        add ("Center", fontWidget);    Panel p = new Panel();    add ("South", p);    Button ok = new Button ("OK");    ok.addActionListener(new ActionListener() {      public void actionPerformed(ActionEvent e) {	dispose();	}});        Button cancel = new Button ("Cancel");    cancel.addActionListener(new ActionListener() {      public void actionPerformed(ActionEvent e) {	fontSize = oldFontSize;	dispose();	}});        p.add (ok);    p.add (cancel);            pack();  }  public void actionPerformed(ActionEvent e) {    fontSize = fontWidget.getValue();  }  public int getFontSize()   {    show();    return fontSize;  }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -