本人有一个对话框用来改变颜色public class MenuFont extends JDialog implements类
{MenuFont() {
super();//“一般JDialog要附在一个窗口上但applet不行所以我认为可能是这个原因”
MenuFont 中有一个public Font myLayout(Font taFont) { if(changed)
return returnFont();
else
return taFont;}
}函数经过一系列的变换返回一个Font数值
还有一个applet类public class Myeditor extends JApplet implements ActionListener,
CaretListener,
DocumentListener,
KeyListener{mf = new MenuFont();
//改变字体
Font f=mf.myLayout(ta.getFont());
ta.setFont(f);//ta是一个文本类}
但调用 ta.setFont(f);后不能改变字体
急!想知道怎样可以把数据传过来
{MenuFont() {
super();//“一般JDialog要附在一个窗口上但applet不行所以我认为可能是这个原因”
MenuFont 中有一个public Font myLayout(Font taFont) { if(changed)
return returnFont();
else
return taFont;}
}函数经过一系列的变换返回一个Font数值
还有一个applet类public class Myeditor extends JApplet implements ActionListener,
CaretListener,
DocumentListener,
KeyListener{mf = new MenuFont();
//改变字体
Font f=mf.myLayout(ta.getFont());
ta.setFont(f);//ta是一个文本类}
但调用 ta.setFont(f);后不能改变字体
急!想知道怎样可以把数据传过来
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货