| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 424 人关注过本帖
标题:小程序有点小毛病
只看楼主 加入收藏
大嘴先生2
Rank: 1
等 级:新手上路
威 望:2
帖 子:815
专家分:0
注 册:2006-4-17
收藏
 问题点数:0 回复次数:1 
小程序有点小毛病
import java.awt.*;
import javax.swing.*;
public class AritDemo
{
public static void main(String[] args)
{
AritFrame frame = new AritFrame();
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.show();
}
}
class AritFrame extends JFrame
{
private JLabel T;
public AritFrame()
{
setTitle("Arit Demo");
Container container=getContentPane();
container.setLayout(new FlowLayout());
T=new JLabel("Java,你好!");
T.getLocation(400,100);
Font f=new Font(T,Font.BOLD,32);
text.setFont(f);
container.add(T,BorderLayout.SOUTH);
setVisible(true);
pack();
setSize(450,150);
}
}
搜索更多相关主题的帖子: 毛病 
2006-07-06 21:25
hujf_go
Rank: 1
等 级:新手上路
帖 子:46
专家分:0
注 册:2006-5-13
收藏
得分:0 
import java.awt.*;
import javax.swing.*;
public class AritDemo
{
public static void main(String[] args)
{
AritFrame frame = new AritFrame();
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.show();
}
}
class AritFrame extends JFrame
{
private JLabel T;
public AritFrame()
{
setTitle("Arit Demo");
Container container=getContentPane();
container.setLayout(new FlowLayout());
T=new JLabel("Java,你好!");
T.getLocale();
// T.getLocation(400,100);
Font f=new Font("宋体",Font.BOLD,32);
//text.setFont(f); text是什么来的?没有定义吧
container.add(T,BorderLayout.SOUTH);
setVisible(true);
pack();
setSize(450,150);
}
}

天未塌,我还在,就让风雨迎面来~
2006-07-06 21:57
快速回复:小程序有点小毛病
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.017201 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved