Java中没有字体设置的font dialog? 好像没有,不过有设置颜色和文件选择的,JDK1.4不知有没有,不过可以自己写一个,JBuilder上就有一个,可以参照一下。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 com.borland.dbswing.FontChooser fontChooser1 = new com.borland.dbswing.FontChooser();fontChooser1.showDialog() com.borland.dbswing.FontChooser fontChooser1 = new FontChooser();void jMenuItem5_actionPerformed(ActionEvent e) { this.fontChooser1.setSelectedFont(this.content.getFont()); if(this.fontChooser1.showDialog()) this.content.setFont(this.fontChooser1.getSelectedFont()); this.repaint(); this.content.repaint();} 我在前边加了import com.borland.dbswing.*;可是jbuilder还是显示cannot acess class com.borland.dbswing.fontchooser 选择菜单 project -> project properties -> required libraries ->add增加 borland 下的dbswing 你找一下jbuilder7,lib目录下有没有dbswing.jar这个文件,没有,还是自己写一个吧,很简单的。 怎么写一个打印员工信息的方法 关于synchronized! 数流行语言 还看今朝 O北京额草他、 html 标记 规范化 Java中使用信号量比使用synchronized有什么优点? 十万火急,高手帮忙!! 关于堆,栈和JAVA的数据的存储! 如何将JPanel的变为透明显示? [怪象论坛]为什么总有那么多“我要……”? 求救,java swing在Red Hat7.2下中文成了小方框,有谁知道怎么办呀!!!! 如何在JBuilder中编写有多个类的应用程序? 谁知道Velocity模板生成器
fontChooser1.showDialog()
void jMenuItem5_actionPerformed(ActionEvent e) {
this.fontChooser1.setSelectedFont(this.content.getFont());
if(this.fontChooser1.showDialog())
this.content.setFont(this.fontChooser1.getSelectedFont());
this.repaint();
this.content.repaint();
}
import com.borland.dbswing.*;
可是jbuilder还是显示
cannot acess class com.borland.dbswing.fontchooser
增加 borland 下的dbswing